AymDev
0
Q:

py random int

# imports random
import random
# randint generates a random integar between the first parameter and the second
print(random.randint(1, 100))
34
# imports random
import random
# randint generates a random integar between the first parameter and the second
print(random.randint(1, 100))
# random generates a random real number in the interval [0, 1)
print(random.random())
19
import random

random.randint(3, 9)
0

Tags

Related

New to Communities?

Join the community