Advertisement
Lonely_Wanderer

Solution_6_15

Apr 22nd, 2023 (edited)
766
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. flag = False
  2. timer = 0
  3. count = 0
  4. while timer<10000:
  5.     if touch.pressed() and not flag:
  6.         flag = True
  7.         count +=1
  8.     elif not touch.pressed():
  9.         flag = False
  10.     timer+=1
  11. ev3.screen.draw_text(50,50, count)
  12. wait(3000)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement