samedi 11 juin 2016

How to get program to restart without using break?

answer = input('how are you')
if answer == 'good':
    print('glad to hear it')
if answer == 'what?':
    print('how are you?')

Without using break, how do I start at the beginning again if the user were to input 'what?' How would I do this with only variables and loops?

Aucun commentaire:

Enregistrer un commentaire