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

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
主站蜘蛛池模板: 稻城县| 香港 | 新宁县| 宁强县| 晴隆县| 嘉鱼县| 玉环县| 沽源县| 浪卡子县| 遂宁市| 蚌埠市| 三台县| 五峰| 闵行区| 栾川县| 元阳县| 江门市| 贵港市| 皋兰县| 措勤县| 潞城市| 金溪县| 石渠县| 澄迈县| 元阳县| 连州市| 香格里拉县| 康乐县| 河北省| 南开区| 新余市| 遵化市| 武陟县| 郸城县| 上蔡县| 靖州| 博罗县| 平和县| 若羌县| 金阳县| 南通市|