dimanche 20 septembre 2015

make a program choose number 1 until 100

How to make the program choose a value from 1 to 100? The program cannot print the correct value

while True:
    regage = raw_input('Enter your age:')
    if regage not in range(1,100):
        print 'Please put an apropriate number for your age'
    else:
        print 'you are', regage,'years old'

Aucun commentaire:

Enregistrer un commentaire