random interger python code example

Example 1: random int python

import random

random.randint(1, 1000) #inclucive

Example 2: python random

import random
print(random.randint(0,1))

Example 3: how to make a random int in python

random.randint(0, 100)
##This would make the random number be from 0 to 100

Example 4: python random number

import random # Imports the random package so that the program has full access to random-based functions

start = 1 # Put your staring value here

end = 8 # Put your ending value here

number = random.randint(start, end) # Calls the randomint function of  random to generate a random number

print(number) # Prints the number that was generated above