[Tutor] Output never stops

David david at abbottdavid.com
Sun Aug 3 04:14:27 CEST 2008


Very new to python and never programed before. Can not figure out why 
the output never stops when I run this in a terminal


#!/usr/bin/python


choice = raw_input("Enter the name Lary or Joan (-1 to quit): ")
while choice != '-1':          person = {'Lary': 43,'Joan': 24}
   if choice == 'Lary':
       print "Lary's age is:", person.get('Lary')

   elif choice == 'Joan':
       print "Joan's age is:", person.get('Joan')

   else:
        print 'Bad Code'

-- 
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com



More information about the Tutor mailing list