大家的编程(Python入门)-第三周Quiz

来源:互联网 发布:led滚动屏幕软件 编辑:程序博客网 时间:2024/05/16 08:52

请大家自己做,不要交头接耳 =3=

1. When Python is running in the interactive mode and displaying the chevron prompt (>>>) - what question is Python asking you?

(A) What Python script would you like me to run?
(B) What is your favourite color?
(C) What is the next machine language instruction to run?
(D) What Python statement would you like me to run?

2. What will the following program print out:
>>> x = 15
>>> x = x + 5
>>> print x
(A) 20
(B) 5
(C) 15
(D) "print x"
(E) x + 5

3. Python scripts (files) have names that end with:
(A) .exe
(B) .doc
(C) .py
(D) .png

4. Which of these words is a reserved word in Python ?
(A) for
(B) names
(C) pizza
(D) payroll

5. What is the proper way to say “good-bye” to Python?
(A) // stop
(B) while
(C) quit()
(D) #EXIT

6. Which of the parts of a computer actually executes the program instructions?
(A) Secondary Memory
(B) Input/Output Devices
(C) Central Processing Unit
(D) Main Memory

7. What is "code" in the context of this course?
(A) A way to encrypt data during World War II
(B) A sequence of instructions in a programming language
(C) A password we use to unlock Python features
(D) A set of rules that govern the style of programs

8. A USB memory stick is an example of which of the following components of computer architecture?
(A) Main Memory
(B) Central Processing Unit
(C) Secondary Memory
(D) Output Device

9. What is the best way to think about a "Syntax Error" while programming?
(A) The computer has used GPS to find your location and hates everyone from your town
(B) The computer needs to have its software upgraded
(C) The computer did not understand the statement that you entered
(D) The computer is overheating and just wants you to stop to let it cool down

10. Which of the following is not one of the programming patterns covered in Chapter 1?
(A) Random steps
(B) Repeated Steps
(C) Sequential Steps
(D) Conditional Steps
0 0
原创粉丝点击