12th Jul 2018, 5:34 AM
Raphael Shay
Raphael Shay - avatar
2 Answers
+ 3
I assume this is just your scaffolding and that the real stuff is still coming. Your error is not on line 25 but above it, the "try:" is looking for its "except:" there are some confusing things in your scaffolding, but keeping in the vein of things, this is how I would change it """ For example, 123 is a Spy number, as the sum of its digits is 6 (1+2+3) which is equal to the product of its digits: 6 (1x2x3). """ print("Please enter a number:") inputNumber = input().lower() print(str(inputNumber)) def spyNumber(): print("Spy number activated") def numberOrLetter(): try: check = (int(inputNumber)) except: print("Not a number") """ if int(inputNumber) == 0: spyNumber() elif int(inputNumber)/int(inputNumber) == 1: """ spyNumber() numberOrLetter()
12th Jul 2018, 6:12 AM
Louis
Louis - avatar
12th Jul 2018, 6:50 AM
Oma Falk
Oma Falk - avatar