0

I want my program to either wait 10 seconds before moving on, or break the loop by user input

try:
    while True:
        afkseconds = 0
        time.sleep(1)
        afkseconds +=1
    if afkseconds == 10:
            Timer()
except KeyboardInterrupt:
    pass

newTaskIO = input('Y/N: ')
newTaskIO = newTaskIO.lower()

if newTaskIO == 'y':
    taskName = input('Enter the name of the task: ')
    taskDescription = input('Enter a brief description, or press enter to continue: ')

The program enters the while Loop, adding a second to the "afksecond" variable. The idea is once the afksecond variable = 10, the loop breaks and performs the specified function.

Either that or the user enters "y" or "n" to break the loop and continue with the next phase of the program. I cannot figure out the logic to get this to work. Please advicse

user10718646
  • 43
  • 1
  • 5

0 Answers0