clicktest.py

Created by pikube

Created on November 06, 2019

412 Bytes

Testez à quelle vitesse vous pouvez appuyez sur EXE! Essayez click(5), où 5 est la durée du test.


import time
import kandinsky as k
def click(t):
  score=-1
  for loop in range(3):
    u=3-loop
    k.draw_string("%s"%u,150,101)
    time.sleep(1)
  k.draw_string("go",150,101)
  t1=time.monotonic()
  t2=time.monotonic()
  while t2-t1<t:
    if input()=="":
      score+=1
    k.draw_string("score:%s"%score,150,101)
    t2=time.monotonic()
    cps=score/t
  k.draw_string("cps:%s"%cps,150,120)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.