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

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
主站蜘蛛池模板: 康平县| 德清县| 内丘县| 太保市| 铜梁县| 巴马| 林芝县| 灌云县| 海安县| 新津县| 利辛县| 邵武市| 章丘市| 吉林省| 临沧市| 泰州市| 蓬安县| 昌图县| 浦北县| 武定县| 崇仁县| 裕民县| 荔波县| 汾阳市| 博白县| 桂平市| 栾川县| 晴隆县| 广河县| 青阳县| 兰溪市| 齐齐哈尔市| 达孜县| 罗江县| 威远县| 含山县| 郓城县| 昌吉市| 黔南| 宜宾市| 南陵县|