Answers for "what does the randint command do in python"

0

what does the randint command do in python

the randint() method in Python returns a random integer value between the two lower and higher limits (including both limits) provided as two parameters.
  
  ## example
  
 import random

RANDOM = random.randint(1, 10) # This basically says RANDOM is a random number between 1 and 10

print("Here is a random number between 1 and 10 {}".format(RANDOM))
# Result - Here is a random number between 1 and 10 <SOME RANDOM NUMBER>
Posted by: Guest on August-27-2021

Code answers related to "what does the randint command do in python"

Python Answers by Framework

Browse Popular Code Answers by Language