I made a program in python that looks like this:
import time
y = "a"
x = 0
while x != 10 and y == "a":
y = input("What is your name? ")
time.sleep(1)
x = x + 1
if y != "a":
print("Hi " + y)
else:
print("You took too long to answer...")
I know that there is a way of accomplishing the same thing at this question: Keyboard input with timeout in Python, but I would like to know why this is not working. No matter how long I wait it doesn't time out; it just sits there waiting for me to type something in. What have I done wrong? I am using python 3.3 on Win 7.