Why the below code gets stuck after entering either int. or str in sublime text ? same code runs fine with python3 command line or pycharm.
print ('\n asks for an integer and prints the square of it\n')
def square(num):
return num **2
def ask():
while True:
try:
usr_input = int(input('Input an integer:'))
except:
print (f'An error occurred! Please try again!')
continue
else:
return (f'Thank you, your number squared is:{square(usr_input)}')
print(ask())