I am new to Python3 and I have some problems. I've created a program like this:
x = input("Type a number: ")
time.sleep(x)
Every time I use this I get an error. I don't know what I am doing wrong, could someone help me?
I am new to Python3 and I have some problems. I've created a program like this:
x = input("Type a number: ")
time.sleep(x)
Every time I use this I get an error. I don't know what I am doing wrong, could someone help me?
Console input is of type str
by default:
Type cast it to int
.
x = int(input("Type a number: "))
time.sleep(x)