Answers & Verified Rationales Complete Quiz
Preparation Guide
1. When a programmer needs to display text on separate lines without using multiple print
statements, which character sequence should be incorporated within the string argument?
A) \t
B) \r
C) \n
D) \b
Correct Answer: C) \n
The \n escape sequence represents a newline character that forces the print() function to break
the output line and continue printing subsequent text on the next line.
2. What fundamental role does the print() function serve when displaying multiple values
passed as arguments separated by commas?
A) It only displays the first argument
B) It concatenates all arguments without separation
C) It displays all arguments with default space separation
D) It ignores all arguments except the last one
Correct Answer: C) It displays all arguments with default space separation
The print() function accepts any number of arguments and displays them sequentially,
automatically inserting spaces between each value by default.
,3. Which syntax correctly represents the numeric value of 20.12 multiplied by 10 raised to
the eighth power in Python?
A) 20.12*10^8
B) 20.12E8.0
C) 20.12E8
D) 20E12.8
Correct Answer: C) 20.12E8
Scientific notation in Python uses the letter 'E' or 'e' followed by the exponent, and 20.12E8
correctly represents 20.12 × 10⁸ without a decimal in the exponent.
4. What does the 0o prefix indicate when placed before a numeric literal in Python code?
A) The number is in decimal format
B) The number is in octal format
C) The number is in hexadecimal format
D) The number is in binary format
Correct Answer: B) The number is in octal format
The 0o prefix is Python's designated notation for octal numbers, indicating the base-8 numeral
system where digits range from 0 to 7.
5. What mathematical operation does the ** operator perform when used between two
numeric operands?
A) Floating-point multiplication
B) Repeated multiplication
C) Exponentiation
D) The operator does not exist in Python
Correct Answer: C) Exponentiation
,The ** operator is Python's exponentiation operator that raises the left operand to the power of
the right operand, performing the power operation.
6. When evaluating the expression in Python, what type and value does the result
produce?
A) The integer value 1
B) An unpredictable result
C) The float value 1.0
D) Cannot be evaluated
Correct Answer: C) The float value 1.0
In Python 3, the / operator always performs floating-point division, returning a float result even
when the operands are integers that divide evenly.
7. Which statement about Python operators is definitively false and contradicts Python's
actual behavior?
A) Multiplication precedes addition in order of operations
B) The ** operator uses right-sided binding
C) The / operator always returns an integer value
D) The right argument of the % operator cannot be zero
Correct Answer: C) The / operator always returns an integer value
The / operator in Python always returns a floating-point result, not an integer, making this
statement false while all other statements are true about Python operators.
8. Given the expression 1 // 2 * 3, what value results from left-sided binding evaluation?
A) 4.5
B) 0.0
, C) 0
D) 0.16666666666666666
Correct Answer: C) 0
Left-sided binding means operators of equal precedence execute left to right, so 1 // 2 equals 0,
then 0 * 3 equals 0, producing the integer result.
9. Which variable name among the following options is considered illegal and cannot be
used in Python?
A) true
B) TRUE
C) True
D) tRUE
Correct Answer: C) True
True is a Python reserved keyword representing a boolean value and cannot be used as a
variable name, while true, TRUE, and tRUE are all legal identifiers.
10. How many arguments can the print() function accept and process in a single call?
A) Exactly one argument
B) No more than five arguments
C) Any number of arguments including zero
D) Any number of arguments excluding zero
Correct Answer: C) Any number of arguments including zero
The print() function is designed with variable-length parameter capability, allowing it to accept
any number of arguments, from zero to many, without restriction.