how to make a number randomizer in python code example
Example 1: how to tell python to create a random numer
#to choose a random number simply do this
import random
print(random.randint(1, 100))
Example 2: how to create a random number between 1 and 10 in python
smallest = 0
largest = 100
random_number = random.randint(smallest, largest - 1)
Example 3: python generate list of random numbers
import random
randomlist = []
for i in range(0,5):
n = random.randint(1,30)
randomlist.append(n)
print(randomlist)