[Tutor] infinite loop
Dave Angel
d at davea.name
Fri Nov 18 04:54:33 CET 2011
On 11/17/2011 04:29 PM, ADRIAN KELLY wrote:
> #i am nearly there guys..........please loop at the infinite loop i am getting here..................PLEASE!!#ADRIAN
>
> def exchange(cash_in): euro=1 dollar=float(1.35) base=50 if cash_in>base: totalreturn=cash_in*dollar else: totalreturn=0 return totalreturn
> amount=float()def main(): amount = float(raw_input('how much do you want to change:')) while amount<50: print 'Sorry, cannot convert an amount under €50 ' else: total=exchange(amount) print 'Your exchange comes to: ',total main()
>
>
Till you learn how to post in text mode, I and many others will be
unable to read your messages. See how the lines above are all running
together?
But congratulations on picking a good subject for this one. Others like
"please help" are useless subject lines.
While I've got your attention, please put your response after the
material you're quoting. Not before. And use standard quoting
techniques so people can tell your portions apart from the rest. (That
last point will probably address itself when you switch to non-html
messages)
--
DaveA
More information about the Tutor
mailing list