0

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?

GrgBls
  • 5
  • 2

1 Answers1

1

Console input is of type str by default:

Type cast it to int.

x = int(input("Type a number: "))
time.sleep(x)
cs95
  • 379,657
  • 97
  • 704
  • 746