Guest User

Untitled

a guest
Jun 13th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. from microbit import *
  2. import music
  3.  
  4. x = 0
  5. y = 0
  6. while True:
  7. display.set_pixel(x, y, 9)
  8.  
  9. if x == 4 and y == 4:
  10. music.play(music.POWER_UP)
  11. display.clear()
  12. x = 0
  13. y = 0
  14.  
  15. if button_a.was_pressed():
  16. x = x + 1
  17. if x > 4:
  18. x = 4
  19.  
  20. if button_b.was_pressed():
  21. y = y + 1
  22. if y > 4:
  23. y = 4
Add Comment
Please, Sign In to add comment