#--------------------------------------------------------- # Module name: lect10_2.py # part 1: using if-elif to implement a # multiway branch; # By: Sharon M. Tuttle # last modified: 10-26-05 #--------------------------------------------------------- choice = raw_input("What's to eat? ") if choice == 'spam': print 1.25 elif choice == 'ham': print 1.99 elif choice == 'eggs': print 0.99 elif choice == 'bacon': print 1.10 else: print 'Bad choice'