Fwd: [Tutor] Control flow

Bob Gailer bgailer at alum.rpi.edu
Sat Jan 29 16:43:00 CET 2005


At 04:43 AM 1/29/2005, Liam Clarke wrote:
>< erk, to the list, to the List!>
>
>if ( bad_weather =='y' ):
>    # ask user only if weather is bad.
>    b = input ( "Weather is really bad, still go out to jog?[y/n]" )
>    if b == 'y':
>       go_jogging()
>
>Anyone else notice that he's never gonna go jogging if the weather is bad?
>Unless I've got input() wrong, it only takes integers... ?

 From the docs:
input( [prompt])
Equivalent to eval(raw_input(prompt)).

Bob Gailer
mailto:bgailer at alum.rpi.edu
303 442 2625 home
720 938 2625 cell 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050129/03a209e0/attachment.htm


More information about the Tutor mailing list