Answers for "python random odule"

5

python random

from random import randint # Import randint from random
print(randint(1,20)) # Gets random number from first parameter to the second
Posted by: Guest on October-07-2020
0

generate random number python

import random
lower_limit = 0 # Can be anything
upper_limit = 100 # Again, can be anything
# Print it out
print(f"Here is a random number: {random.randint(lower_limit, upper_limit)}
Posted by: Guest on July-30-2020

Code answers related to "python random odule"

Python Answers by Framework

Browse Popular Code Answers by Language