+ 1
Why does this code return always false?
num=input("insert a number") print(isinstance(num, int))
5 Respuestas
+ 2
This is the way to do it:
https://code.sololearn.com/cXtU736SbKcy/?ref=app
+ 5
Because num is a string... input() gets the input as a string, always, even numbers... To turn the input into an int you will have to do: int(num).
+ 2
Now the code gives me error after typing input
https://code.sololearn.com/cQVoic03uJ6Z/?ref=app
+ 2
Let's see the code. Can you post a link to it here?
+ 2
Thank you