На 16 строке нужно сделать таймер на 10 секунд после 2 клика, затем выполнить pen.write("Your cps: ", screen.click / 10)
from turtle import *
from time import *
screen = Screen()
screen.click = 0
pen = Turtle()
pen.hideturtle()
def count(x,y):
screen.click += 1
pen.clear()
if screen.click > 1:
pen.write(screen.click, font=("Roboto", 100, "bold"), align="center")
else:
pen.write('Click to start', font=("Roboto", 100, "italic"), align="center")
16 СТРОКА
pen.write("Your cps: ", screen.click / 10)
screen.onclick(count)
screen.mainloop()
screen.onclick(count)
-
Вопрос задан
-
225 просмотров