Mathematical Expressions MCQ Practice

Question 1 of 10

What is the value of the expression 17 MOD 5?

  1. A. 2
  2. B. 3
  3. C. 3.4
  4. D. 5

Question 2 of 10

Evaluate 4 + 3 * 2 using standard order of operations.

  1. A. 14
  2. B. 10
  3. C. 11
  4. D. 24

Question 3 of 10

A list nums holds values 10, 20, 30, 40 at indexes 1 through 4. What does the segment display?

i ← 2 + 1
DISPLAY (nums[i])
  1. A. 10
  2. B. 20
  3. C. 30
  4. D. 40

Question 4 of 10

Which expression equals 1?

Label Expression
W 14 MOD 4
X 15 MOD 5
Y 9 MOD 2
Z 8 MOD 3
  1. A. Z only
  2. B. W only
  3. C. X only
  4. D. Y only

Question 5 of 10

What is displayed?

a ← 5
b ← 2
DISPLAY ((a + 3) * b - (a MOD 3))
  1. A. 14
  2. B. 16
  3. C. 13
  4. D. 11

Question 6 of 10

A checker uses n MOD 2 = 0 to detect even integers. For which n is the condition true?

  1. A. 21
  2. B. 18
  3. C. 27
  4. D. 15

Question 7 of 10

Evaluate (8 - 2) / 3.

  1. A. 1
  2. B. 4
  3. C. 2
  4. D. 6

Question 8 of 10

List data holds 5, 10, 15, 20, 25 at indexes 1 through 5. What is displayed?

k ← 11 MOD 4
DISPLAY (data[k])
  1. A. 20
  2. B. 5
  3. C. 10
  4. D. 15

Question 9 of 10

Which expression evaluates to 9?

  1. A. (2 + 3) * 2 - 1
  2. B. 20 MOD 9
  3. C. 3 * 4 - 4
  4. D. 2 + 3 * 2

Question 10 of 10

What is 23 MOD 7?

  1. A. 5
  2. B. 2
  3. C. 3
  4. D. 4