I'm trying to create an option for the program to repeat if the user types 'y' 
or 'yes', using true and false values, or otherwise end the program. If anyone 
could explain to me how to get this code working, I'd appreciate it.

letters='abcdefghijklmn'
batman=True
def thingy():
    print('type letter from a to n')
    typedletter=input()
    if typedletter in letters:
        print('yes')
    else:
        print('no')
def repeat():
    print('go again?')
    goagain=input()
    if goagain in ('y', 'yes'):
        print('ok')
    else:
        print('goodbye')
        batman=False
while batman==True:
    thingy()
    repeat()
    print('this is the end')
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to