Dec-15-2016, 02:35 AM
(This post was last modified: Dec-15-2016, 02:35 AM by ichabod801.)
First, you're doing the same thing twice. You have two functions that are basically identical. Make one function that gets a number, and use that function twice.
Second, follow the code. What happens when you have an invalid input? It goes into the except block, and calls itself again recursively. What does it do with the result of calling itself? Nothing. You need to return the result of the function calling itself. (
Second, follow the code. What happens when you have an invalid input? It goes into the except block, and calls itself again recursively. What does it do with the result of calling itself? Nothing. You need to return the result of the function calling itself. (
return num_1()
)
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