Worksheets2.1.6 - 2.1.7 Sequence of Execution Quizizz Extra Practice (SD)
Total questions: 55
Worksheet time: 58mins
Which expression evaluates first in: x = 3 + 2 * 4?
3 + 2
2 * 4
x = 3
x =
How is the expression evaluated: not True and False?
None
False
True
Error
Which is the result of 3 ** 2 % 5?
4
1
9
0
Match each operator with the correct description of its precedence in mathematical expressions.
+
Addition operator
-
Subtraction operator
*
Multiplication operator (evaluated first)
=
Assignment operator
Which does 7 % 3 * 2 evaluate to?
2
1
4
5
Which is the result of 3 ** 2 % 5?
9
4
0
1
Match each expression with the result that evaluates first according to operator precedence.
x =
Assignment operator in an equation
2 * 4
Multiplication in an arithmetic expression
x = 3
Variable initialization with a value
3 + 2
Addition in an arithmetic expression
The operator with the highest precedence in Python is (a) .
What is the result of 4 + 5 == 9?
False
True
9
Error
What will print: print(4 + 2 * 3)?
18
12
10
24
Which does the expression 10 > 5 and 3 < 1 evaluate to?
False
True
Error
None
Which operator has the lowest precedence?
Arithmetic
Comparison
Assignment
Logical
The expression 3 > 2 and 1 < 2 is (a) .
Which operator has the highest precedence: %, *, +?
*
%
+
and
How is the expression evaluated: not True and False?
True
False
None
Error
Match the following expressions with their correct results:
A. 20
5 * 2 ** 2 = ?
B. 25
5 ** 2 = ?
C. 10
2 * 5 = ?
D. 14
7 + 7 = ?
What does not True or False evaluate to?
True
False
None
Error
(a) is a comparison operator.
The result of 5 + 3 * 2 is (a) .
Which is the result of 4 + 5 == 9?
Error
True
False
9
Match each expression with the order in which it is evaluated in 'a > b and not c == d'.
a * b
First expression evaluated
c == d
Second expression evaluated
not
Third operation evaluated
and
Fourth operation evaluated
a = b
Fifth operation evaluated
Which is the result of 5 * 2 ** 2?
A. 10
B. 25
C. 20
D. 14
What operator is used for floor division?
/
//
**
%
What is the result of 5 * 2 ** 2?
A. 14
B. 20
C. 25
D. 10
What expression is True? 3 > 2 and 1 < 2
False
Error
True
None
What is the precedence order of logical operators?
and, or, not
or, not, and
not, and, or
not, or, and
Which operator has the highest precedence in Python?
Addition
Logical AND
Assignment
Exponents
Match each expression with the order in which it is evaluated in 'a > b and not c == d'.
a > b
First expression evaluated
not
Second operation performed
c == d
Third expression evaluated
and
Final operation performed
What operator is evaluated first: *, +, or -?
*
=
-
+
What is the result of 3 ** 2 % 5?
1
0
4
9
Which comes first in precedence: logical 'and' or 'or'?
or
and
not
is
How is the expression evaluated: not True and False?
True
False
None
Error
Which operator is used for floor division?
%
/
//
**
Which is the result of 5 * 2 ** 2?
A. 20
B. 25
C. 10
D. 14
What does the expression 10 > 5 and 3 < 1 evaluate to?
True
False
None
Error
If Arithmetic is first, put the remaining five operator types in order of execution from first to last.
Containment
Comparison
Identity
Logical
Assignment
What always supersedes (comes before) all operators in the order of operations when evaluating an expression?
Put these operator categories in order from first to last in execution:
(Hint: Only use these four; ignore containment and identity.)
Arithmetic
Comparison
Logical
Assignment
Inside arithmetic operators, list the order of operations.
Which operator category is evaluated first in the expression below?
score + 10 in bonus_list == 1 and active is True
Comparison
Arithmetic
Identity
Containment
Which of the following shows the correct order of all six operator categories from first to last?
Containment → Arithmetic → Comparison → Identity → Logical → Assignment
Arithmetic → Containment → Comparison → Identity → Logical → Assignment
Arithmetic → Comparison → Containment → Identity → Logical → Assignment
Arithmetic → Containment → Identity → Comparison → Logical → Assignment
Which operator category is evaluated last (after all the others)?
Arithmetic operator
Which of the following gives the correct order of logical operators from first to last?
Reorder the following to give the correct order of logical operators from first to last?
not
and
or
Comparisons (like ==, >, <) are evaluated:
Before arithmetic but after assignments
Before assignments but after arithmetic
After logical and assignment
After containment and identity
Evaluate the expression step by step and give the final value of result
result = 3 2 in [2, 4, 6] and 6 == 3 2
True
False
It causes an error
"True"
For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.
3 + 4 * 2
For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.
(3 + 4) * 2
For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.
20 - 6 // 2
For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.
5 + 18 % 4
For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.
2 x 3 ** 2
For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.
25 // 4 + 2
For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.
7 + 24 // 5 * 2
For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.
40 % 6 + 2 ** 3
For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.
32 // 5 + 32 % 5
