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

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
主站蜘蛛池模板: 盈江县| 虎林市| 德格县| 西藏| 大渡口区| 原平市| 水富县| 南雄市| 香格里拉县| 海淀区| 高州市| 密山市| 辰溪县| 崇阳县| 屏东县| 泾源县| 增城市| 信宜市| 同江市| 东源县| 神池县| 马公市| 岑溪市| 阳曲县| 万载县| 邯郸市| 遂平县| 韩城市| 海门市| 余干县| 泗洪县| 罗源县| 晋中市| 高邑县| 寻甸| 松原市| 宜兰县| 宁都县| 错那县| 日照市| 霍州市|