title: math quiz with a time limit (simultaneous functions) - advanced python
body: <p>So I would like to run two programs, a timer and a math question. But always the input seems to be stopping the timer funtion or not even run at all. Is there any ways for it to get around that? 
  I'll keep the example simple.</p>
  
  <pre><code>import time
  
  start_time = time.time()
  timer=0
  correct = answer
  answer = input("9 + 9 = ") 
  #technically a math question here
  #so here until i enter the input prevents computer reading the code
  while True:
      timer = time.time() - start_time
      if timer &gt; 3:
  #3 seconds is the limit
      print('Wrong!')
  quit()
  </code></pre>
  
  <p>So recap i would like the player to answer the question in less than 3 seconds.</p>
  
  <p>after the 3 seconds the game will print wrong and exit</p>
  
  <p>if the player answer within three seconds the timer would be 'terminated' or stopped before it triggers 'wrong' and quit</p>
  
  <p>hope you understand, and really appreciate your help</p>