Python Quick Checks
Who developed the Python programming language?
Guido Van Rossum
What output is produced by the following code? print(15+30)
45
What value is assigned to the variable num by the following statement if the current value of num is 4? num=num*2
8
What is the Python shell?
A window in which Python statements and expressions are executed immediately
A Python program must be enclosed in curly braces { } to be executed.
False
A Python program must compiled into an executable form before it can be run.
False
In Python, the assignment statement is also an expression.
False
In dynamically typed languages, variables are declared to store a specific type of data.
False
Python 3 is backwards compatible to Python 2.
False
Python variables that represent integers are NOT object reference variables.
False
Running a program that contains errors will cause the Thonny development environment to terminate.
False
The Python programming language was so named after a snake was discovered in the creator's office.
False
The assignment operator has higher precedence than the arithmetic operators.
False
The value assigned to a variable must be numeric.
False
You must use a print statement to display the result of an expression in the Python shell.
False
Thonny is best described as which of the following?
Integrated Development Environment (IDE)
What output is produced by the following code? print('Jan', 'Feb', 'Mar', sep='-')
Jan-Feb-Mar
What output does the following code produce? print('Ready', end=' ') print('Set', end='') print('Go')
Ready SetGo
What is syntax coloring?
Showing certain events of program code in different colors
What does the term case sensitivemean?
The difference between uppercase and lowercase letters matters.
Which of the following statements is true? a. The print statement is a call to a function b. The print statement sends text output to a printer. c. The print statement sends text output to the editor. d. A print statement must be the first statement in a Python program.
The print statement is a call to a function
Python is a general-purpose programming language, appropriate for solving problems in many areas of computing.
True
Python variables are created using an assignment statement.
True
The Python shell has an integrated help system.
True
The Python shell is great for exploring Python language features.
True
The output of a Python program run in Thonny appears in the shell window.
True
The value assigned to a variable could be a floating point number
True
The value of a variable can change throughout a program.
True
Thonny displays code using syntax highlighting.
True
Thonny has a package manager that lets you install and update external Python packages.
True
You can store a value in a variable in the Python shell.
True
What output does the following code produce? print('apple', 'banana')
apple banana
Which of the following is NOT a valid Python identifier? a.first_place b. place1 c. 1stPlace d. FIRST_PLACE
c. 1stPlace
Python embodies elements of which programming paradigm? a. Procedural programming b. Object-oriented programming c. Functional programming d. all of the above
d. all of the above
What output is produced by the following code? print('oak', 'elm', 'pine', end='!', sep='#')
oak#elm#pine!
Which of the following identifiers follows the convention for naming Python variables?
total_value
Which of the following is NOT a principle embraced by the Python programming language?
verbose is better than succinct