[Tutor] (no subject)

Steven D'Aprano steve at pearwood.info
Sun Nov 11 18:47:37 EST 2018


On Sun, Nov 11, 2018 at 03:00:00PM -0800, Stealth Fleet wrote:

[...]
> tokenAmount works but the buy and cashIn are not being ran why?

You define the function, but never call it. Functions aren't called 
automatically.

py> def example():
...     print("calling example")
...
py>
py> # nothing is happening yet...
...
py> example()  # call the function
calling example


> When I put
> "print(buy, cashIn)" it gives me a long message that ends in an error

Would you like to tell us that message, or would you prefer that we make 
a wild guess?

Please COPY AND PASTE (don't summarise or retype from memory) the ENTIRE 
error message, not just the last line, and especially DON'T take a 
screen shot or photo and send that.



-- 
Steve


More information about the Tutor mailing list