Skip to content

Commit 6925fea

Browse files
authored
Add files via upload
1 parent 75cadad commit 6925fea

File tree

5 files changed

+38
-0
lines changed

5 files changed

+38
-0
lines changed

1_zoo.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add your Python code here. E.g.
2+
from microbit import *
3+
import time
4+
5+
while True:
6+
if pin0.is_touched():
7+
display.show(Image.DUCK)
8+
sleep(10)
9+
elif pin1.is_touched():
10+
display.show(Image.COW)
11+
sleep(10)
12+
elif pin2.is_touched():
13+
display.show(Image.BUTTERFLY)
14+
sleep(10)
15+
else:
16+
display.show(Image.SKULL)
17+
sleep(1)

2_microbit_piano.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add your Python code here. E.g.
2+
from microbit import *
3+
import time
4+
import music
5+
6+
while True:
7+
if pin0.is_touched():
8+
tune = ["A2:4"]
9+
music.play(tune)
10+
sleep(4)
11+
elif pin1.is_touched():
12+
tune = ["B2:4"]
13+
music.play(tune)
14+
sleep(4)
15+
elif pin2.is_touched():
16+
tune = ["C2:4"]
17+
music.play(tune)
18+
sleep(4)
19+
else:
20+
display.show(Image.SKULL)
21+
sleep(1)

L20 Activity.docx

458 KB
Binary file not shown.

L20.pptx

2.2 MB
Binary file not shown.

Lesson_plan_20.docx

60.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)