官术网_书友最值得收藏!

A quick task for you

Now that you have finished this chapter, can you answer these questions?

Q1. What must a function begin with?

  1. def
  2. Function
  3. Input
  4. Whitespace

Q2. What are conventions that are used to name variables and functions?

  1. Must use lowercase letters
  2. Multiple words need to be connected with underscores
  3. Cannot use a number to start a name
  4. All of the above

Q3. Every line after the first line of a function must be?

  1. Named using numbers
  2. Have a colon, :
  3. Indented
  4. Use parentheses ()

Q4. If you want a code file to run in Python, you need to end it with?

  1. .txt
  2. .odt
  3. .pdf
  4. .py

Q5. To run a code file in the terminal, what do you need to do?

  1. Type the name of the file in the terminal
  2. Type the name of the file in the terminal while running Python
  3. In the correct folder, type Python and the name of the file
  4. All of the above steps in order
主站蜘蛛池模板: 嵊泗县| 陇川县| 恩施市| 根河市| 扶余县| 青阳县| 崇明县| 扶余县| 河东区| 隆昌县| 浙江省| 友谊县| 平罗县| 广昌县| 包头市| 双牌县| 牙克石市| 宜川县| 江陵县| 龙胜| 玉山县| 高陵县| 三门县| 宜章县| 西吉县| 西乌| 浙江省| 平原县| 和平县| 临夏市| 长丰县| 湘乡市| 仙居县| 凤台县| 玉山县| 黄石市| 进贤县| 易门县| 秦安县| 盘锦市| 武穴市|