Answers for "randint"

CSS
82

python random

# imports random
import random
# randint generates a random integar between the first parameter and the second
print(random.randint(1, 100))
Posted by: Guest on December-23-2019
27

python random

# 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())
Posted by: Guest on March-03-2020
7

generate random number python

import random

random.randint(lower, upper)
Posted by: Guest on May-16-2020
13

python randint

from random import randint

# generate an integer between 3 and 9 (inclusive range).
# (see randrange for exclusive range)
print(randint(3, 9))
Posted by: Guest on April-22-2020
0

randint

random.randint(a, b)
Posted by: Guest on May-06-2021
0

randint

print(random.randint(5, 11)) #5 = start   #11 = stop
Posted by: Guest on November-15-2020

Browse Popular Code Answers by Language