This is my code
num = input()
if  not isinstance(num,int):
    print("wrong input")
    num = input()
However if I type letters from keyboard,the computer gives this error:
please input a num
q
Traceback (most recent call last):
File "ex11.py", line 8, in <module>
  num = input()
  File "<string>", line 1, in <module>
NameError: name 'q' is not defined
 
    