?

AP® Computer Science Principles

Free Version

Upgrade subject to access all content

Easy

Random Integers: 4 and 19

APCSP-DGRE7A

Which expression makes sure that $x$ is a random number between 4 and 19 inclusive?

A

RANDOM(0, 15) + 4

B

RANDOM(1, 14) + 5

C

[RANDOM(1, 8) * 2] + 1

D

[RANDOM(1, 6) * 3] + 1