Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

2.1.6 - 2.1.7 Sequence of Execution Quizizz Extra Practice (SD)

Total questions: 55

Worksheet time: 58mins

Name
Class
Date
1.

Which expression evaluates first in: x = 3 + 2 * 4?

a)

3 + 2

b)

2 * 4

c)

x = 3

d)

x =

2.

How is the expression evaluated: not True and False?

a)

None

b)

False

c)

True

d)

Error

3.

Which is the result of 3 ** 2 % 5?

a)

4

b)

1

c)

9

d)

0

4.

Match each operator with the correct description of its precedence in mathematical expressions.

a)

+

1.

Addition operator

b)

-

2.

Subtraction operator

c)

*

3.

Multiplication operator (evaluated first)

d)

=

4.

Assignment operator

5.

Which does 7 % 3 * 2 evaluate to?

a)

2

b)

1

c)

4

d)

5

6.

Which is the result of 3 ** 2 % 5?

a)

9

b)

4

c)

0

d)

1

7.

Match each expression with the result that evaluates first according to operator precedence.

a)

x =

1.

Assignment operator in an equation

b)

2 * 4

2.

Multiplication in an arithmetic expression

c)

x = 3

3.

Variable initialization with a value

d)

3 + 2

4.

Addition in an arithmetic expression

8.

The operator with the highest precedence in Python is (a)   .

Choose from the below words
Assignment
Logical AND
Exponents
Addition
9.

What is the result of 4 + 5 == 9?

a)

False

b)

True

c)

9

d)

Error

10.

What will print: print(4 + 2 * 3)?

a)

18

b)

12

c)

10

d)

24

11.

Which does the expression 10 > 5 and 3 < 1 evaluate to?

a)

False

b)

True

c)

Error

d)

None

12.

Which operator has the lowest precedence?

a)

Arithmetic

b)

Comparison

c)

Assignment

d)

Logical

13.

The expression 3 > 2 and 1 < 2 is (a)   .

Choose from the below words
True
False
None
Error
14.

Which operator has the highest precedence: %, *, +?

a)

*

b)

%

c)

+

d)

and

15.

How is the expression evaluated: not True and False?

a)

True

b)

False

c)

None

d)

Error

16.

Match the following expressions with their correct results:

a)

A. 20

1.

5 * 2 ** 2 = ?

b)

B. 25

2.

5 ** 2 = ?

c)

C. 10

3.

2 * 5 = ?

d)

D. 14

4.

7 + 7 = ?

17.

What does not True or False evaluate to?

a)

True

b)

False

c)

None

d)

Error

18.

(a)   is a comparison operator.

Choose from the below words
=
+=
<=
and
19.

The result of 5 + 3 * 2 is (a)   .

Choose from the below words
16
10
11
8
20.

Which is the result of 4 + 5 == 9?

a)

Error

b)

True

c)

False

d)

9

21.

Match each expression with the order in which it is evaluated in 'a > b and not c == d'.

a)

a * b

1.

First expression evaluated

b)

c == d

2.

Second expression evaluated

c)

not

3.

Third operation evaluated

d)

and

4.

Fourth operation evaluated

e)

a = b

5.

Fifth operation evaluated

22.

Which is the result of 5 * 2 ** 2?

a)

A. 10

b)

B. 25

c)

C. 20

d)

D. 14

23.

What operator is used for floor division?

a)

/

b)

//

c)

**

d)

%

24.

What is the result of 5 * 2 ** 2?

a)

A. 14

b)

B. 20

c)

C. 25

d)

D. 10

25.

What expression is True? 3 > 2 and 1 < 2

a)

False

b)

Error

c)

True

d)

None

26.

What is the precedence order of logical operators?

a)

and, or, not

b)

or, not, and

c)

not, and, or

d)

not, or, and

27.

Which operator has the highest precedence in Python?

a)

Addition

b)

Logical AND

c)

Assignment

d)

Exponents

28.

Match each expression with the order in which it is evaluated in 'a > b and not c == d'.

a)

a > b

1.

First expression evaluated

b)

not

2.

Second operation performed

c)

c == d

3.

Third expression evaluated

d)

and

4.

Final operation performed

29.

What operator is evaluated first: *, +, or -?

a)

*

b)

=

c)

-

d)

+

30.

What is the result of 3 ** 2 % 5?

a)

1

b)

0

c)

4

d)

9

31.

Which comes first in precedence: logical 'and' or 'or'?

a)

or

b)

and

c)

not

d)

is

32.

How is the expression evaluated: not True and False?

a)

True

b)

False

c)

None

d)

Error

33.

Which operator is used for floor division?

a)

%

b)

/

c)

//

d)

**

34.

Which is the result of 5 * 2 ** 2?

a)

A. 20

b)

B. 25

c)

C. 10

d)

D. 14

35.

What does the expression 10 > 5 and 3 < 1 evaluate to?

a)

True

b)

False

c)

None

d)

Error

36.

If Arithmetic is first, put the remaining five operator types in order of execution from first to last.

a)

Containment

b)

Comparison

c)

Identity

d)

Logical

e)

Assignment

1)
2)
3)
4)
5)
37.

What always supersedes (comes before) all operators in the order of operations when evaluating an expression?

4 lines
38.

Put these operator categories in order from first to last in execution:

  • (Hint: Only use these four; ignore containment and identity.)

a)

Arithmetic

b)
  • Comparison

c)
  • Logical

d)

Assignment

1)
2)
3)
4)
39.

Inside arithmetic operators, list the order of operations.

4 lines
40.

Which operator category is evaluated first in the expression below?

score + 10 in bonus_list == 1 and active is True

a)

Comparison

b)

Arithmetic

c)

Identity

d)

Containment

41.

Which of the following shows the correct order of all six operator categories from first to last?

a)

Containment → Arithmetic → Comparison → Identity → Logical → Assignment

b)

Arithmetic → Containment → Comparison → Identity → Logical → Assignment

c)

Arithmetic → Comparison → Containment → Identity → Logical → Assignment

d)

Arithmetic → Containment → Identity → Comparison → Logical → Assignment

42.

Which operator category is evaluated last (after all the others)?

a)
Comparison operator
b)
Logical operator
c)

Arithmetic operator

d)
Assignment operator
43.

Which of the following gives the correct order of logical operators from first to last?

a)
OR, NOT, AND
b)
AND, NOT, OR
c)
AND, OR, NOT
d)
NOT, AND, OR
44.

Reorder the following to give the correct order of logical operators from first to last?

a)

not

b)

and

c)

or

1)
2)
3)
45.

Comparisons (like ==, >, <) are evaluated:

a)

Before arithmetic but after assignments

b)

Before assignments but after arithmetic

c)

After logical and assignment

d)

After containment and identity

46.

Evaluate the expression step by step and give the final value of result

result = 3 2 in [2, 4, 6] and 6 == 3 2

a)

True

b)

False

c)

It causes an error

d)

"True"

47.

For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.

3 + 4 * 2

4 lines
48.

For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.

(3 + 4) * 2

4 lines
49.

For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.

20 - 6 // 2

4 lines
50.

For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.

5 + 18 % 4

4 lines
51.

For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.

2 x 3 ** 2

4 lines
52.

For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.

25 // 4 + 2

4 lines
53.

For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.

7 + 24 // 5 * 2

4 lines
54.

For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.

40 % 6 + 2 ** 3

4 lines
55.

For each expression below, use order of operations to predict the final value exactly as Python would evaluate it.

32 // 5 + 32 % 5

4 lines