help - except?
hi this is my code: def x(n): result = 1 while n > 0: result = result * n n -= 1 return result while True: print('input a positive number ') i=input() if i=="exit": print('quitter!') break # elif try: # int(i) # except ValueError # print('number! not word!') elif int(i) >= 0: n=int(i) print(n, ' factorial is ', x(n)) break else: print('must be positive') please look at commented part i dont know how to complete it correctly i want to print "number! not word!" if input is not "exit" nor integer type im looking for solution or maybe i should use sth different than "except" im sure there are other ways to do it