python algorithm generator 1

python algorithm generator

from random import randint

print(randint(1,3))

#Possible Outputs#
#1
#2
#3

Here is what the above code is Doing:
1. We’re importing the randint function from the random module.
2. We’re printing a random integer between 1 and 3.
3. We’re printing a random integer between 1 and 3.
4. We’re printing a random integer between 1 and 3.

Similar Posts