On Thu, Nov 17, 2011 at 1:53 PM, <[email protected]> wrote:
> Post the error stack.
> Sent from my BlackBerry wireless device from MTN
>
> -----Original Message-----
> From: ADRIAN KELLY <[email protected]>
> Sender: [email protected]
> Date: Thu, 17 Nov 2011 18:47:07
> To: <[email protected]>
> Subject: [Tutor] local variable referenced before assignment
>
> _______________________________________________
> Tutor maillist - [email protected]
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
>
> _______________________________________________
> Tutor maillist - [email protected]
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
>
if amount>base:
totalreturn=amount*dollar
else:
print 'not enough'
return totalreturn
Notice if amount isn't more than base totalreturn is not created, so the
else clause executes and totalreturn doesn't exist
--
Joel Goldstick
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor