Scott
0
Q:

randint

# imports random
import random
# randint generates a random integar between the first parameter and the second
print(random.randint(1, 100))
34
from random import randint

# generate an integer between 3 and 9 (inclusive range).
# (see randrange for exclusive range)
print(randint(3, 9))
8
import random

random.randint(lower, upper)
6
from random import randint

print(randint(3, 9))
6
# 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
#In contrast to randInt .random.uniform generates a floating number between two variables
# imports random
import random
# randint generates a random integar between the first parameter and the second
print(random.randint(1, 100))
4
import random

print(random.randint(2, 8))    
# This generates a random number from 2 to 8
0
print(random.randint(5, 11)) #5 = start   #11 = stop
0

New to Communities?

Join the community