Apr-11-2019, 02:14 AM
The variable num is never 0 on line 10, because you add one to it on line 8. So you never return 0. Furthermore, if 'done' is the first response, the while loop doesn't run, and you return the default of None. Note that your return statement should be after the while loop. Right now the program returns after the second thing entered, no matter what.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures