Friday, 2 August 2019

8. Write a random number generator that generates random numbers between 1 and 6 (simulates a dice).

def random():
    import random
    s=random.randint(1,6)
    return s
print(random()) 

output

5
4
3

5 comments: