[Tutor] infinite loop
ADRIAN KELLY
kellyadrian at hotmail.com
Thu Nov 17 22:29:37 CET 2011
#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()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111117/ebf33369/attachment.html>
More information about the Tutor
mailing list