Question 1 of 10
How many distinct integers can RANDOM(2, 2) produce?
- A. 3
- B. 0
- C. 1
- D. 2
How many distinct integers can RANDOM(2, 2) produce?
Which value can RANDOM(10, 12) produce?
Code rolls two dice:
d1 ← RANDOM(1, 6)
d2 ← RANDOM(1, 6)
total ← d1 + d2
Which total is impossible?
A weather simulation uses rainChance ← RANDOM(1, 100). Why is it incorrect to assume every run prints 50?
How many distinct integers can RANDOM(8, 12) produce?
The table shows inclusive RANDOM ranges.
| Call | Possible values |
|---|---|
| RANDOM(1, 2) | 1, 2 |
| RANDOM(3, 5) | 3, 4, 5 |
| RANDOM(0, 1) | ? |
What replaces the question mark?
Expression: RANDOM(5, 1). On the AP CSP exam reference, a and b should satisfy a ≤ b for the usual inclusive range. Separately, assume a working interpreter requires a ≤ b. Which claim is safest for this course?
A game sets damage ← RANDOM(3, 5) + RANDOM(3, 5). Which damage value is impossible?
Which statement correctly describes RANDOM(1, 3)?
How many distinct integers can RANDOM(0, 0) produce?