2nd Semester Intro to Computer Science

Do Now 3.01

In your Console

Type the following code

import random
random.randint(0, 3)
random.randint(0, 3)
print(random.randint(0, 3))
print(random.randint(0, 3))
print(random.randint(0, 3))

In your Notebook

Respond to the following

  1. What does randint do?
  2. What do the values 0 and 3 do? Try changing those numbers, rerun the program, and write down what changed.
  3. What is the difference between random.randint(0,3) and print(random.randint(0,3))?

Edit this page Report an issue