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