[Tutor] local variable referenced before assignment
ADRIAN KELLY
kellyadrian at hotmail.com
Thu Nov 17 19:47:07 CET 2011
hi all,keep getting the above error, can't understand or fix it, can anyone help.
def exchange(): euro=1 dollar=1.35 base=50 amount = input ('how much do you want to change') if amount>base: totalreturn=amount*dollar else: print 'not enough' return totalreturn
print exchange()
Adrian Kelly
1 Bramble Close
Baylough
Athlone
County Westmeath
0879495663
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111117/5b6196e5/attachment.html>
More information about the Tutor
mailing list