![]() |
Question Number 2 - printTwice
I'm back with another simple question.
I won't dwell over this like I did the last one. I'd just like to know why the author of the book I've been reading says :
printTwice(5)Gives the result 5 5 He has a few different examples all to do with the printTwice call but when I try and do it, it says :
Traceback (most recent call last):Thanks. |
Re: Question Number 2 - printTwice
Because, presumably, you haven't defined printTwice in that script / interactive session. My guess is you're reading a bit too fast and missed something like:
:
def printTwice(arg): |
Re: Question Number 2 - printTwice
Quote:
Thanks for that. Not sure how I missed it but I thought it was like "print" but just printed it twice instead of once. Thanks again. |
| All times are GMT -5. The time now is 3:37 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC