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

  • Python Projects for Kids
  • Jessica Ingrassellino
  • 163字
  • 2021-07-09 19:35:13

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
主站蜘蛛池模板: 大理市| 木兰县| 贵南县| 兴仁县| 交口县| 昭苏县| 桃源县| 昆山市| 育儿| 宜丰县| 新乡市| 香河县| 林芝县| 察雅县| 宁乡县| 平泉县| 祁东县| 达日县| 临高县| 霍城县| 民勤县| 梅州市| 江山市| 永定县| 轮台县| 武山县| 正阳县| 青铜峡市| 新宾| 九台市| 田阳县| 故城县| 安泽县| 昂仁县| 临邑县| 康保县| 清原| 南皮县| 云霄县| 定边县| 景谷|