dimanche 12 juillet 2020

What is the probability to print 'A' , 'B',and 'c'?

import random
y=random.randint(1,10)
if y>=1 and y<3:
    print ("A")
elif y>=3 and y<=7:
    print ("B")
else:
    print("C")



Aucun commentaire:

Enregistrer un commentaire