Visit: https://a2zcareers.viden.io
random()
function to make a random number, but Python has a built-in module called random
that can be used to make random numbers:ExampleImport the random module, and display a random number between 1 and 9:
import random
print(random.randrange(1,10))