Can not determine variable type by assigning a value to it using a input() func, why?

I’m assigning a numerical value to a variable called code using the input() function in the terminal. Below are my lines of code:

code = input("Please enter your code:\n")

print(code)
print("\n")
print(type(code))

my question though is that, why after doing so I wouldn’t be able to determine the type of my variable called code, using this line of code print(type(code)). My interpreter in VS Code would give me back this error:

Please enter your code:
2
Unable to find thread for evaluation.

Is there something wrong with my debugger settings or Debug Console? or something that I’m missing? I’m pretty new to all of this, so please explain in simple terms. Thanks a lot.