Menu

Random Library - Code Quiz

1. Which line must be added above this code so that it runs without an error?

roll = random.randint(1, 6) print('Roll: ' + str(roll))
import random.random
random import
import random
import randint

2. Which values can this call produce?

value = random.randint(1, 6)
1, 2, 3, 4, 5 or 6
2, 3, 4, 5 or 6
0, 1, 2, 3, 4, 5 or 6
1, 2, 3, 4 or 5

Log in or sign-up to access the quiz



Don't have a login?

You can still revise this topic