[Tutor] Re: HELP

alan.gauld@bt.com alan.gauld@bt.com
Mon, 19 Aug 2002 17:28:31 +0100


>  I got this working but how do I get it say say 
> chose 1 for michael or type 2 for ryan? 

> print "Hi my name is michael and this is the subertrip program"
> print "-------------------------------------------------------"
> print "please pick a name"

print "1. Michael"
print "2. Ryan"

> name = int(raw_input("enter 1 for michael: "))

name = int(raw_input("Pick a number(1/2) "))
if name == 1:
   print "michael is so cool"
elif: name == 2:
   print "He is cool but not as cool as MIchael?"

The next step is to handle invalid input. Try searching 
the archives for this group at active state for "menu" 
and "error" etc.

Its all been covered in the last couple of weeks...

Alan g.