Mar-27-2019, 03:40 PM
(This post was last modified: Mar-27-2019, 03:47 PM by ClassicalSoul.)
What is wrong with this code?? If I input a number it says I get 'That is not a number'. Why?
Haha, I figured it out. It's meant to be is.numeric()
while True: text = input('Number (or \'Quit\' to exit): ') if text == 'Quit': print('...exiting program') break elif text.isnumeric == True : print(int(text) + 2) else: print('That is not a number', end = '\n')Thanks
Haha, I figured it out. It's meant to be is.numeric()