We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bfd2420 commit 76e327cCopy full SHA for 76e327c
embedded-python/simon_says.py
@@ -1,4 +1,4 @@
1
-from microbit import * # noqa
+from microbit import display, Image, accelerometer, sleep
2
from random import randrange
3
4
# Define left, stay still and right
@@ -23,12 +23,12 @@
23
elif acc_x > 200:
24
user_in = "R"
25
26
- # Check win condition
27
- if user_in == direction:
28
- # User input correctly
29
- points += 1
30
- else:
31
- display.scroll(points)
32
- display.show(Image.SAD)
33
- points = 0
34
- sleep(1000)
+ # Check win condition
+ if user_in == direction:
+ # User input correctly
+ points += 1
+ else:
+ display.scroll(points)
+ display.show(Image.SAD)
+ points = 0
+ sleep(1000)
0 commit comments