Python‎ > ‎Control Flow‎ > ‎

next

http://www.adilwaseem.com/

Return with round value of random.betavariate()+(random.gammavariate().
import random
x=round((random.betavariate(3,1))+(random.gammavariate(3,21)))
if x in range(1,9):
    print("The random value is single digit: ", x)
    y=input("Do you add to generate number one more time: y/n")
    if y=="y":
        print("Second random value is: ", round((random.betavariate(3,1))+(random.gammavariate(3,21))))
            elif y=="n":
                next
elif x in (range(10,99)):
    print("Random value is: ", round((random.betavariate(3,1))+(random.gammavariate(3,21))))
    z=input("Do you add to generate number one more time: y/n: ")
    if z=="y":
        print("Second random value is: ", round((random.betavariate(3,1))+(random.gammavariate(3,21))))
    elif z=="n":
        next
else:
print("Random value is: ", round((random.betavariate(3,1))+(random.gammavariate(3,21))))


Comments