# data[].attributes.attachment_link.title
Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.

# data[].attributes.attachment_link.description
A new tool that blends your everyday work apps into one. It’s the all-in-one workspace for you and your team

# data[].attributes.body
#마무리 미션
#리스트에는 판매 개수가 들어 있습니다.
coffee = [87, 63, 64, 110, 144, 143, 69, 53, 133, 55, 78, 123, 63, 101]
waffle = [87, 36, 32, 101, 41, 78, 115, 31, 53, 11, 13, 119, 25, 65]

#step1 커피 와플 각각의 일별 매출
coffee = np.array(coffee) *3400
waffle = np.array(waffle) *6700
print(coffee)
print(waffle)

#step2. 커피와 와플 각각의 총 매출과 평균 매출을 각각 구하세요.
coffee_total=np.sum(coffee)
waffle_total=np.sum(coffee)
coffee_abs = int(coffee_total/len(coffee))
waffle_abs = int(waffle_total/len(waffle))
print("커피의 총 매출은 : {}원입니다.".format(coffee_total))
print("와플의 총 매출은 : {}원입니다." format(waffle_total))
print("커피의 평균 매출은 : {}원입니다."format(coffee_abs))
print("와플의 평균 매출은 : {}원입니다."format(waffle_abs))

#step3. 카페의 일별 총매출을 구하세요.
total = coffee+waffle
print(total)

#step4. 카페의 일별 매출이 450,000원을 넘지 못한 날을 추출하고, 가격과 인덱스 번호를 출력하세요.
Filter = np.where(total<=450000)
print((Filter))
print(total([Filter]))

# data[].attributes.body
#마무리 미션
#리스트에는 판매 개수가 들어 있습니다.
coffee = [87, 63, 64, 110, 144, 143, 69, 53, 133, 55, 78, 123, 63, 101]
waffle = [87, 36, 32, 101, 41, 78, 115, 31, 53, 11, 13, 119, 25, 65]

#step1 커피 와플 각각의 일별 매출
coffee = np.array(coffee) *3400
waffle = np.array(waffle) *6700
print(coffee)
print(waffle)

#step2. 커피와 와플 각각의 총 매출과 평균 매출을 각각 구하세요.
coffee_total=np.sum(coffee)
waffle_total=np.sum(waffle)
coffee_abs = int(coffee_total / len(coffee))
waffle_abs = int(waffle_total/len(waffle))
print("커피의 총 매출은 : {}원 입니다.".format(coffee_total))
print("와플의 총 매출은 : {}원 입니다.".format(waffle_total))
print("커피의 평균 매출은 : {}원 입니다.".format(coffee_abs))
print("와플의 평균 매출은 : {}원 입니다.".format(waffle_abs))
#step3. 카페의 일별 총매출을 구하세요.
total = coffee+waffle
print(total)

#step4. 카페의 일별 매출이 450,000원을 넘지 못한 날을 추출하고, 가격과 인덱스 번호를 출력하세요.
Filter = np.where(total<=450000)
print(Filter)
print(total[Filter])

# data[].attributes.body
사본 만드셔서 저에게 공유로 보내주셔요

# data[].attributes.body
from microbit import *

import speech

index = 0

emotion = [Image.HAPPY, Image.SAD, Image.SMILE, Image.SURPRISED, Image.CONFUSED]

emotion_word = ["I'm happy..", "I'm sad..", "I'm good..",

"I'm surprised..", "I'm confused.."]

display.show(emotion[index])

while True:

if button_a.was_pressed():

index -= 1

if index<0:

index = 4

display.show(emotion[index])

speech.say(emotion_word[index])

elif button_b.was_pressed():

index += 1

if index > 4:

index = 0

display.show(emotion[index])

speech.say(emotion_word[index])

# data[].attributes.body
from microbit import *

import speech

index = 0

emotion = [Image.HAPPY, Image.SAD, Image.SMILE,

Image.SURPRISED, Image.CONFUSED]

emotion_word = ["I'm happy..", "I'm sad..", "I'm good..",

"I'm surprised..", "I'm confused.."]

display.show(emotion[index])

while True:

if button_a.was_pressed():

index -= 1

if index < 0:

index = 4

display.show(emotion[index])

speech.say(emotion_word[index])

elif button_b.was_pressed():

index += 1

if index > 4:

index = 0

display.show(emotion[index])

speech.say(emotion_word[index])

# data[].attributes.body
from microbit import*

import speech

index = 0

emotion = [Image.HAPPY, Image.SAD, Image.SMILE, Image.SURPRISED, Image.CONFUSED]

emotion_word = ["I'm happy..", "I'm sad..","I'm good..","I'm surprised..","I'm confused.."]

display.show(emotion[index])

while True:

if button_a.was_pressed():

index -= 1

if index<0:

index = 4

display.show(emotion[index])

speech.say(emotion_word[index])

elif button_b.was_pressed():

index += 1

if index > 4:

index = 0

display.show(emotion[index])

speech.say(emotion_word[index])

# data[].attributes.body
from microbit import*

import speech

index= 0

emotion = [Image.HAPPY, Image.SAD, Image.SMILE,

Image.SURPRISED, Image.CONFUSED]

emotion_word = ["I'm happy..", "I'm sad..", "I'm good..",

"I'm surprised..", "I'm confused.."]

display.show(emotion[index])

while True:

if button_a.was_pressed():

index -= 1

if index < 0:

index=4

display.show(emotion[index])

speech.say(emotion_word[index])

elif button_b.was_pressed():

index += 1

if index > 4:

index =0

display.show(emotion[index])

speech.say(emotion_word[index])

# data[].attributes.body
from microbit import*

import speech

index = 0

emotion = [Image.HAPPY, Image.SAD, Image.SMILE,

Image.SURPRISED, Image.CONFUSED]

emotion_word = ["I'm happy..", "I'm sad..", "I'm good..",

"I'm surprised", "I'm confused.."]

display.show(emotion[index])

while True:

if button_a.was_pressed():

index -= 1

if index <0:

index = 4

display.show(emotion[index])

speech.say(emotion_word[index])

elif button_b.was_pressed():

index += 1

if index >4:

index = 0

display.show(emotion[index])

speech.say(emotion_word[index])

# data[].attributes.body
from microbit import *

import speech

index = 0

emotion = [Image.HAPPY, Image.SAD, Image.SMILE,

Image.SURPRISED, Image.CONFUSED]

emotion_word = ["I'm happy..", "I'm sad..", "I'm good..",

"I'm surprised..", "I'm confused.."]

display.show(emotion[index])

while True:

if button_a.was_pressed():

index -= 1

if index < 0:

index = 4

display.show(emotion[index])

speech.say(emotion_word[index])

elif button_b.was_pressed():

index += 1

if index > 4:

index = 0

display.show(emotion[index])

speech.say(emotion_word[index])

# data[].attributes.body
from microbit import *

import speech

index = 0

emotion = [Image. SAD, Image. CONFUSED, Image. ANGRY, Image. ASLEEP, Image. HAPPY]

emotion_word = ["I'm sad..", "I'm confused..", "I'm upset..", "I'm sleepy..", "I'm happy.." ]

display. show(emotion[index])

while True:

if button_a.was_pressed():

index -= 1

if index < 0:

index = 4

display. show(emotion[index])

speech.say(emotion_word[index])

elif button_b.was_pressed():

index += 1

if index > 4:

index = 0

display.show(emotion[index])

speech.say(emotion_word[index])

# data[].attributes.body
from microbit import*

import speech

index = 0

emotion = [Image.HAPPY, Image.SAD, Image.SMILE,

Image.SURPRISED, Image.CONFUSED]

emotion_word = ["I'm happy..", "I'm sad..", "I'm good..",

"I'm surprised", "I'm confused.."]

display.show(emotion[index])

while True:

if button_a.was_pressed():

index -= 1

if index <0:

index = 4

display.show(emotion[index])

speech.say(emotion_word[index])

elif button_b.was_pressed():

index += 1

if index >4:

index = 0

display.show(emotion[index])

speech.say(emotion_word[index])

# data[].attributes.body
from microbit import*

import speech

index = 0

emotion = [Image.HAPPY, Image.SAD, Image.SMILE, Image.SURPRISED, Image.CONFUSED]

emotion_word = ["I'm happy..", "I'm sad..","I'm good..","I'm surprised..","I'm confused.."]

display.show(emotion[index])

while True:

if button_a.was_pressed():

index -= 1

if index<0:

index = 4

display.show(emotion[index])

speech.say(emotion_word[index])

elif button_b.was_pressed():

index += 1

if index > 4:

index = 0

display.show(emotion[index])

speech.say(emotion_word[index])

# data[].attributes.body
from microbit import *

import speech

index = 0

emoticon = [Image.HAPPY, Image.SAD, Image.SMILE, Image.SURPRISED, Image.CONFUSED]

emoticon_word = ["So Happy", "So Sad", "So Good", "So Surprused", "So Confused"]

display.show(emoticon[index])

while True:

if button_a.was_pressed():

index -= 1

if index < 0:

index = 4

display.show(emoticon[index])

speech.say(emoticon_word[index])

elif button_b.was_pressed():

index += 1

if index > 4:

index = 0

display.show(emoticon[index])

speech.say(emoticon_word[index])

# data[].attributes.body
from microbit import *

import speech

index = 0

emotion = [Image.HAPPY, Image.SAD, Image.SMILE,

Image.SURPRISED, Image.CONFUSED]

emotion_word =["I'm happy..", "I'm sad..", "I'm good..",

"I'm surprise..", "I'm confused.."]

while True:

if button_a.was_pressed():

index -= 1

if index < 0:

index = 4

display.show(emotion_word[index])

elif button_b.was_pressed():

index += 1

if index > 4:

index = 0

display.show(emotion[index])

speech.say(emotion_word[index])

# data[].attributes.body
from microbit import*

import speech

index =0

emotion = [Image.HAPPY,Image.SAD,Image.SMILE,Image.SURPRISED,Image.CONFUSED]

emotion_word = ["I'm happy YEAH!","I'm sad...","I'm good.!!","I'm surprised","I'm confused"]

display.show(emotion[index])

while True:

if button_a.was_pressed():

index-=1

if index<0:

index =4

display.show(emotion[index])

speech.say(emotion_word[index])

elif button_b.was_pressed():

index +=1

if index>4:

index=0

display.show(emotion[index])

speech.say(emotion_word[index])

# data[].attributes.body
iimport speech

import random

from microbit import *

when = random.choice(["Once upon a time", "A hundred years ago",

"A day ago", "Long time ago"])

who = random.choice(["a hare and a tortoise", "a prince and a princess",

"Little red and a wolf", "Three little pig"])

do = random.choice(["fought each other", "had lunch ", "jumped rope",

"studied hard", "took a walk"])

where = random.choice(["in the park", "in the gym",

"in the woods", "in the castle"])

story = ["{}, there were {}".format(when, who),

"They {} {}".format(do, where),

"Good night"]

while True:

if button_a.was_pressed():

when = random.choice(["Once upon a time", "A hundred years ago",

"A day ago", "Long time ago"])

who = random.choice(["a hare and a tortoise", "a prince and a princess",

"Little red and a wolf", "Three little pig"])

do = random.choice(["fought each other", "had lunch ", "jumped rope",

"studied hard", "took a walk"])

where = random.choice(["in the park", "in the gym",

"in the woods", "in the castle"])

story = ["{}, there were {}".format(when, who),

"They {} {}".format(do, where),

"Good night"]

for word in story:

speech.say(word, speed=140, pitch=100, throat=90, mouth=100)

sleep(500)

elif button_b.was_pressed():

for word in story:

speech.say(word, speed=120, pitch=100, throat=100, mouth=200)

sleep(500)

# data[].attributes.body
from microbit import *

import audio

import music

led_image = Image("11011:"

"11011:"

"03130:"

"11311:"

"11111")

touch_image = Image("00000:"

"09090:"

"00000:"

"90009:"

"09990")

shake_image = Image("99099:"

"99099:"

"00900:"

"09090:"

"00900")

timer = 0

tune = ['d4:3','e4','c4','g3:15','g3:3','e3','f3','c4','c4',

'd4','d4','d4','e4','c4','g3:15','e4:3','f4','e4','e4','d4','d4']

audio.play(Sound.HELLO)

while True:

display.show(led_image * microphone.sound_level())

if pin_logo.is_touched():

timer = 0

display.show(touch_image)

audio.play(Sound.HAPPY)

elif accelerometer.was_gesture('shake'):

timer = 0

display.show(shake_image)

audio.play(Sound.GIGGLE)

elif button_a.is_pressed():

timer = 0

music.play(music.BIRTHDAY)

elif button_b.is_pressed():

timer = 0

music.play(tune)

else:

sleep(100)

timer += 0.1

if 60 < timer <60.1:

display.show(Image.ASLEEP)

audio.play(Sound.YAWN)

elif 120 < timer <120.1:

display.show(Image.CONFUSED)

audio.play(Sound.SAD)

elif 180 < timer <180.1:

display.show(Image.ANGRY)

audio.play(Sound.MYSTERIOUS)

break

# data[].attributes.body
emotion = [Image.HAPPY, Image.SAD, Image.SMILE,

Image.SURPRISED, Image.CONFUSED]

emotion_word = ["I'm happy..", "I'm sad..", "I'm good..",

"I'm surprised..", "I'm confused.."]

# data[].attributes.body
tune = ['d4:3','e4','c4','g3:15','g3:3','e3','f3','c4','c4',

'd4','d4','d4','e4','c4','g3:15','e4:3','f4','e4','e4','d4','d4']

# data[].attributes.body
led_image = Image("11011:"

"11011:"

"03130:"

"11311:"

"11111")

touch_image = Image("00000:"

"09090:"

"00000:"

"90009:"

"09990")

shake_image = Image("99099:"

"99099:"

"00900:"

"09090:"

"00900")

# data[].attributes.headline
구글 이메일 주소 부탁드려요

# data[].attributes.subject
구글 이메일 주소 부탁드려요

# data[].attributes.body
이름 이메일 주소

# data[].attributes.body
from microbit import * # 마이크로비트 모듈의 모든 명령 사용

import random # 랜덤 모듈의 모든 명령 사용

dice1 = Image("00000:00000:00900:00000:00000")

dice2 = Image("90000:00000:00000:00000:00009")

dice3 = Image("90000:00000:00900:00000:00009")

dice4 = Image("90009:00000:00000:00000:90009")

dice5 = Image("90009:00000:00900:00000:90009")

dice6 = Image("90909:00000:00000:00000:90909")

dice = [dice1, dice2, dice3, dice4, dice5, dice6]

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo.read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(max)

elif button_b.is_pressed():

display.scroll(str(int(max)))

elif button_a.is_pressed():

trig.write_digital(1) #초음파 발생시작

trig.write_digital(0) #초음파 발생정지

micros= time_pulse_us(echo, 1)

distance= micros / 58.3

display.scroll(str(int(distance)))

if max < distance:

max = distance

else:

display.show(Image.ASLEEP)

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo.read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(max)

elif button_b.is_pressed():

display.scroll(str(int(max)))

elif button_a.is_pressed():

trig.write_digital(1)

trig.write_digital(0)

micros = time_pulse_us(echo,1)

distance = micros / 58.3

display.scroll(str(int(distance)))

if max < distance:

max = distance

else:

display.show(Image.ASLEEP)

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo.read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(max)

elif button_b.is_pressed():

display.scroll(str(int(max)))

elif button_a.is_pressed():

trig.write_digital(1)

trig.write_digital(0)

micros = time_pulse_us(echo, 1)

distance = micros / 58.3

display.scroll(str(int(distance)))

if max <distance:

max = distance

else:

display.show(Image.ASLEEP)

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo. read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(max)

elif button_b. is_pressed():

display.scroll(str(int(max)))

if button_a.is_pressed():

trig.write_digital(1)

trig.write_digital(0)

micros = time_pulse_us(echo, 1)

distance = micros / 58.3

display.scroll(str(int(distance)))

if max < distance:

max = distance

else:

display.show(Image.ASLEEP)

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo.read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(max)

elif button_b.is_pressed():

display.scroll(str(int(max)))

elif button_a.is_pressed():

trig.write_digital(1) #초음파 발생시작

trig.write_digital(0) #초음파 발생정지

micros = time_pulse_us(echo, 1)

distance = micros / 58.3

display.scroll(str(int(distance)))

if max< distance:

max = distance

else:

display.show(Image.HEART)

# data[].attributes.body
from microbit import*

motor = pin1

while True:

display.scroll("temp: ")

sleep(1000)

display.scroll(temperature())

if temperature()> 20:

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("X")

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo.read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(max)

elif button_b.is_pressed():

display.scroll(str(int(max)))

elif button_a.is_pressed():

trig.write_digital(1)

trig.write_digital(0)

micros = time_pulse_us(echo, 1)

distance = micros / 58.3

display.scroll(str(int(distance)))

if max < distance:

max = distance

else:

display.show(Image.HAPPY)

# data[].attributes.body
from microbit import *

from machine import time_pulse_us

trig=pin0

echo=pin0

trig.write_digital(1)

echo.read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(str(int(max)))

elif button_b.is_pressed():

display.scroll(str(int(max)))

elif button_a.is_pressed():

trig.write_digital(1)

trig.write_digital(0)

micros=time_pulse_us(echo, 1)

distance=micros / 58.3

display.scroll(str(int(distance)))

if max < distance:

max =distance

else:

display.show(Image.PACMAN)

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo.read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(max)

elif button_b.is_pressed():

display.scroll(str(int(max)))

elif button_a.is_pressed():

trig.write_digital(1) #초음파 빌생시작

trig.write_digital(0) #초음피 발생정지

micros = time_pulse_us(echo, 1)

distance = micros / 58.3

display.scroll(str(int(distance)))

if max < distance:

max = distance

else:

display.show(Image.ASLEEP)

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo.read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(max)

elif button_b.is_pressed():

display.scroll(str(int(max)))

elif button_a.is_pressed():

trig.write_digital(1)

trig.write_digital(0)

micro = time_pulse_us(echo, 1)

distance = micro / 58.3

display.scroll(str(int(distance)))

if max < distance:

max = distance

else:

display.show(Image.SKULL)

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo.read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(max)

elif button_b.is_pressed():

display.scroll(str(int(max)))

elif button_a.is_pressed():

trig.write_digital(1) #초음파 발생 시작

trig.write_digital(0) #초음파 발생 정지

micros = time_pulse_us(echo, 1)

distance = micros / 58.3

display.scroll(str(int(distance)))

if max < distance:

max = distance

else :

display.show(Image.ASLEEP)

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo. read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(max)

elif button_b. is_pressed():

display.scroll(str(int(max)))

if button_a.is_pressed():

trig.write_digital(1)

trig.write_digital(0)

micros = time_pulse_us(echo, 1)

distance = micros / 58.3

display.scroll(str(int(distance)))

if max < distance:

max = distance

else:

display.show(Image.ASLEEP)

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo.read_digital()

max = 0

while True:

if pin_logo.is_touched():

max = 0

display.scroll(max)

elif button_b.is_pressed():

display.scroll(str(int(max)))

elif button_a.is_pressed():

trig.write_digital(1)

trig.write_digital(0)

micros = time_pulse_us(echo,1)

distance = micros / 58.3

display.scroll(str(int(distance)))

if max < distance:

max = distance

else:

display.show(Image.PACMAN)

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo.read_digital()

max=0

while True:

if pin_logo.is_touched():

max=0

display.scroll(max)

elif button_b.is_pressed():

display.scroll(str(int(max)))

elif button_a.is_pressed():

trig.write_digital(1)

trig.write_digital(0)

micros = time_pulse_us(echo, 1)

distance= micros/58.3

display.scroll(str(int(distance)))

if max < distance:

max=distance

else:

display.show(Image.HEART)

# data[].attributes.body
from microbit import*

from machine import time_pulse_us

trig = pin0

echo = pin0

trig.write_digital(1)

echo.read_digital()

max = 0

while True:

if button_a.is_pressed():

trig.write_digital(1)

trig.write_digital(0)

micros = time_pulse_us(echo, 1)

distance = micros / 58.3

display.scroll(str(int(distance)))

else:

display.show(Image.HAPPY)

# data[].attributes.body
from microbit import *

motor=pin1

while True:

display.scroll("temp")

sleep(1000)

display.scroll(temperature())

if temperature() > 20:

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("NO")

# data[].attributes.body
from microbit import*

motor = pin1

while True:

display.scroll("temp: ")

sleep (1000)

display.scroll(temperature())

if temperature()>20:

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("--")

# data[].attributes.body
from microbit import*

motor = pin1

while True:

display.scroll("temp: ")

sleep(1000)

display.scroll(temperature())

if temperature()> 20:

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("X")

# data[].attributes.body
from microbit import*

motor = pin1

while True:

display.scroll("temp: ")

sleep (1000)

display.scroll(temperature())

if temperature()>20:

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("--")

# data[].attributes.body
from microbit import*

motor = pin1

while True:

display.scroll("temp: ")

sleep(1000)

display.scroll(temperature())

if temperature()>20 :

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("--")

# data[].attributes.body
from microbit import*

motor=pin1

while True:

display.scroll("temp:")

sleep(1000)

display.scroll(temperature())

if temperature()> 20:

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("--")

# data[].attributes.body
from microbit import*

motor=pin1

while True:

display.scroll("temp: ")

sleep(1000)

display.scroll(temperature())

if temperature()> 20:

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("--")

# data[].attributes.body
from microbit import*

motor = pin1

while True:

display.scroll("temp: ")

sleep(1000)

display.scroll(temperature())

if temperature()> 20:

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("--;")

# data[].attributes.body
from microbit import*

moter= pin1

while True:

display.scroll("temp: ")

sleep(2000)

display.scroll(temperature())

if temperature()>20:

moter.write_analog(1023)

display.show("OK")

else:

moter.write_analog(1)

display.show("LOW")

# data[].attributes.body
from microbit import*

motor = pin1

while True:

display.scroll("temp: ")

sleep(1000)

display.scroll(temperature())

if temperature()> 20:

motor.write_analog(1023)

display.show("ok")

else:

motor.write_analog(0)

display.show("--")

# data[].attributes.body
from microbit import*

motor = pin1

while True:

display.scroll("temp: ")

sleep(1000)

display.scroll(temperature())

if temperature() > 20:

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("-")

# data[].attributes.body
from microbit import*

motor = pin1

while True:

display.scroll("temp:")

sleep(1000)

display.scroll(temperature())

if temperature()> 20:

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("--")

# data[].attributes.body
from microbit import*

motor = pin1

while True:

display.scroll("temp: ")

sleep(1000)

display.scroll(temperature())

if temperature()> 20:

motor.write_analog(1023)

display.show("OK")

else:

motor.write_analog(0)

display.show("X")

# data[].attributes.body
#마무리 미션
#리스트에는 판매 개수가 들어 있습니다.
coffee = [87, 63, 64, 110, 144, 143, 69, 53, 133, 55, 78, 123, 63, 101]
waffle = [87, 36, 32, 101, 41, 78, 115, 31, 53, 11, 13, 119, 25, 65]

#step1 커피 와플 각각의 일별 매출
coffee = np.array(coffee) *3400
waffle = np.array(waffle) *6700
print(coffee)
print(waffle)

#step2. 커피와 와플 각각의 총 매출과 평균 매출을 각각 구하세요.

coffee_total = np.sum(coffee)
waffle_total = np.sum(waffle)
coffee_abs = int(coffee_total / len(coffee))
waffle_abs = int(waffle_total / len(waffle))
print("커피의 총 매출은 : {}원 입니다.".format(coffee_total))
print("와플의 총 매출은 : {}원 입니다.".format(waffle_total))
print("커피의 평균 매출은 : {}원 입니다.".format(coffee_abs))
print("와플의 평균 매출은 : {}원 입니다.".format(waffle_abs))

#step3. 카페의 일별 총매출을 구하세요.
total = coffee+waffle
print(total)


#step4. 카페의 일별 매출이 450,000원을 넘지 못한 날을 추출하고, 가격과 인덱스 번호를 출력하세요.
Filter = np.where(total<=450000)
print(Filter)
print(total[Filter])

결과
[295800 214200 217600 374000 489600 486200 234600 180200 452200 187000
 265200 418200 214200 343400]
[582900 241200 214400 676700 274700 522600 770500 207700 355100  73700
  87100 797300 167500 435500]
커피의 총 매출은 : 4372400원 입니다.
와플의 총 매출은 : 5406900원 입니다.
커피의 평균 매출은 : 312314원 입니다.
와플의 평균 매출은 : 386207원 입니다.
[ 878700  455400  432000 1050700  764300 1008800 1005100  387900  807300
  260700  352300 1215500  381700  778900]
(array([ 2,  7,  9, 10, 12]),)
[432000 387900 260700 352300 381700

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("")

bit7 = Image("")

bit8 = Image("")

bit9 = Image("")

bit10 = Image("")

bit11 = Image("")

bit12 = Image("")

bit13 = Image("")

bit14 = Image("")

bit15 = Image("")

bit16 = Image("")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
# Imports go at the top

from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70503:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80806:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70907:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80705:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:09000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70907:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80705:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("0000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
# Imports go at the top

from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70503:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80806:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B3:1")

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70907:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80705:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70907:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80705:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
# Imports go at the top

from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70503:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80806:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00000:00000")

bit6 = Image("00000:04000:50301:00010:00000")

bit7 = Image("00000:05000:60402:00020:00000")

bit8 = Image("00000:06000:70507:00030:00000")

bit9 = Image("00000:07000:80605:00040:00000")

bit10 = Image("00000:08000:90705:00050:00000")

bit11 = Image("00000:09000:80705:00060:00000")

bit12 = Image("00000:08000:70907:00070:00000")

bit13 = Image("00000:07000:60808:00080:00000")

bit14 = Image("00000:06000:50709:00090:00000")

bit15 = Image("00000:05000:40608:00080:00000")

bit16 = Image("00000:04000:30507:00070:00000")

bit17 = Image("00000:03000:20406:00060:00000")

bit18 = Image("00000:02000:10305:00050:00000")

bit19 = Image("00000:01000:00204:00040:00000")

bit20 = Image("00000:00000:00103:00030:00000")

bit21 = Image("00000:00000:00002:00020:00000")

bit22 = Image("00000:00000:00001:00010:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
# Imports go at the top

from microbit import *

from microbit import *

import music

bit2 = Image("90000:09000:00900:00090:00009")

bit3 = Image("00009:00090:00900:09000:90000")

bit4 = Image("00900:00900:00900:00900:00900")

bit5 = Image("90000:09000:00900:00090:00009")

bit6 = Image("00009:00090:00900:09000:90000")

bit7 = Image("90000:09000:00900:00090:00009")

bit8 = Image("00009:00090:00900:09000:90000")

bit9 = Image("00900:00900:00900:00900:00900")

bit10 = Image("90000:09000:00900:00090:00009")

bit11 = Image("00009:00090:00900:09000:90000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11,

bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(3000)

music.play("B7:2")

# data[].attributes.body
from microbit import *

while True:

a=Image("00000:00000:90000:00000:00000")

b=Image("00000:90000:99000:90000:00000")

c=Image("90000:99000:99900:99000:90000")

d=Image("99000:99900:09990:99900:99000")

e=Image("99900:09990:00999:09990:99900")

f=Image("09990:00999:00099:00999:09990")

g=Image("00999:00099:00009:00099:00999")

h=Image("00099:00009:00000:00009:00099")

i=Image("00009:00000:00000:00000:00009")

j=Image("00000:00000:00000:00000:00000")

ab=[a,b,c,d,e,f,g,h,i,j]

display.show(ab,delay=200,loop=True)

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("0000:04000:50301:00020:0000")

bit7 = Image("00000:05000:60402:00030:0000")

bit8 = Image("0000:06000:70907:00040:00000")

bit9 = Image("00000::07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80705:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("000000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70907:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80705:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:09000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("C7:2")

# data[].attributes.body
from microbit import *

while True:

if button_a.is_pressed():

display.show(Image.HAPPY)

if button_b.is_pressed():

display.show(Image.SAD)

if pin_logo.is_touched():

display.show(Image.SILLY)

# data[].attributes.body
from microbit import *

import music

bit1 = Image("99999:00000:00000:00000:00000")

bit2 = Image("99999:99999:00000:00000:00000")

bit3 = Image("99999:99999:99999:00000:00000")

bit4 = Image("99999:99999:99999:99999:00000")

bit5 = Image("00000:00000:00000:00000:00000")

bit6 = Image("00000:00000:00000:00000:99999")

bit7 = Image("00000:00000:00000:99999:99999")

bit8 = Image("00000:00000:99999:99999:99999")

bit9 = Image("00000:99999:99999:99999:99999")

file = [bit1,bit2,bit3,bit4,bit5,bit6,bit7,bit8,bit9]

while True:

display.show(file,delay=350,wait=False)

sleep(1500)

# data[].attributes.body
# Imports go at the top

from microbit import *

from microbit import *

import music

a = Image("10000:02000:00300:00040:00005")

a1 = Image("01000:00200:00030:00004:00050")

a2 = Image("00100:00020:00003:00040:00500")

a3 = Image("00010:00002:00030:00400:05000")

a4 = Image("00001:00020:00300:04000:50000")

a5 = Image("00010:00200:03000:40000:05000")

a6 = Image("00100:02000:30000:04000:00500")

a7 = Image("01000:20000:03000:00040:00050")

file = [a, a1, a2, a3, a4, a5, a6, a7]

while True:

display.show(file, delay=100, wait=False)

sleep(1000)

music.play("B3:2")

# data[].attributes.body
from microbit import *

while True:

a=Image("00009:00900:90000:00090:00900")

b=Image("00900:90000:99000:90000:00000")

c=Image("90000:99000:99900:99000:90000")

d=Image("99000:00900:09990:99900:99000")

e=Image("99900:00999:00999:09990:99900")

f=Image("09990:00999:00099:00999:09990")

g=Image("00999:00000:00009:00099:00999")

h=Image("00099:00009:00900:09009:00099")

i=Image("00009:00099:00090:00000:00009")

j=Image("00000:00999:00009:00000:00000")

ab=[a,b,c,d,e,f,g,h,i,j]

display.show(ab,delay=200,loop=True)

# data[].attributes.body
# Imports go at the top

from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70503:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80806:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70907:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80705:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
from microbit import *

while True:

if button_a.is_pressed():

display.show(Image.GHOST)

if button_b.is_pressed():

display.show(Image.SKULL)

if pin_logo.is_touched():

display.show(Image.SURPRISED)

# data[].attributes.body
from microbit import *

import music

while True:

a = Image("00900:09590:95559:09590:09590")

b = Image("00500:05950:59995:05950:05950")

c = Image("09590:09590:95559:09590 00900")

d = Image("05950:05950:59995:05950:05950")

file = [a, b, c, d]

display.show(file, delay=100, wait=False)

sleep(1500)

music.play(music.BA_DING)

# data[].attributes.body
from microbit import *

while True:

    if button_a.is_pressed():

        display.show(Image.GIRAFFE)

    if button_b.is_pressed():

        display.show(Image.SKULL)

    if pin_logo.is_touched():

        display.show(Image.SAD)

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00300:10000:00402:00000")

bit3 = Image("00000:00300:20000:00402:00000")

bit4 = Image("00000:00300:30100:00402:00000")

bit5 = Image("00000:00300:40200:00402:00000")

bit6 = Image("00000:00300:50301:00402:00000")

bit7 = Image("00000:00300:60402:00402:00000")

bit8 = Image("00000:00300:70907:00402:00000")

bit9 = Image("00000:00300:80604:00402:00000")

bit10 = Image("00000:00300:90705:00402:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10]

while True:

display.show(file, delay=100, wait=False)

sleep(1)

music.play("G3:1")

sleep(10)

music.play("D2:1")

sleep(100)

music.play("B5:1")

sleep(10)

music.play("A2:2")

# data[].attributes.body
# Imports go at the top

from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70503:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80806:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
from microbit import *

import music

import radio

display.show(Image.HEART)

sleep(400)

music.play(music.WEDDING)

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70907:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80705:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
from microbit import *

import music

bit2 = Image("09999:99090:99900:99990:09999")

bit3 = Image("09990:99999:99900:99990:09999")

bit4 = Image("09990:99999:99999:99999:09999")

bit5 = Image("09990:99099:99999:09999:09990")

bit6 = Image("09990:99099:99999:09999:09990")

bit7 = Image("09990:99099:99900:99990:09999")

bit8 = Image("09999:99090:99900:09990:09999")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8]

while True:

display.show(file, delay=2000, wait=False)

sleep(1500)

music.play("B5:2")

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70907:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80705:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")

sleep(1000)

music.play("A5:3")

# data[].attributes.headline
11월 9일- 미션1번 완성예제

# data[].attributes.subject
11월 9일- 미션1번 완성예제

# data[].attributes.body
from microbit import *

import music

bit2 = Image("00000:00000:10000:00000:00000")

bit3 = Image("00000:01000:20000:00000:00000")

bit4 = Image("00000:02000:30100:00000:00000")

bit5 = Image("00000:03000:40200:00010:00000")

bit6 = Image("00000:04000:50301:00020:00000")

bit7 = Image("00000:05000:60402:00030:00000")

bit8 = Image("00000:06000:70907:00040:00000")

bit9 = Image("00000:07000:80604:00050:00000")

bit10 = Image("00000:08000:90705:00060:00000")

bit11 = Image("00000:09000:80705:00070:00000")

bit12 = Image("00000:08000:70907:00080:00000")

bit13 = Image("00000:07000:60808:00090:00000")

bit14 = Image("00000:06000:50709:00080:00000")

bit15 = Image("00000:05000:40608:00070:00000")

bit16 = Image("00000:04000:30507:00060:00000")

bit17 = Image("00000:03000:20406:00050:00000")

bit18 = Image("00000:02000:10305:00040:00000")

bit19 = Image("00000:01000:00204:00030:00000")

bit20 = Image("00000:00000:00103:00020:00000")

bit21 = Image("00000:00000:00002:00010:00000")

bit22 = Image("00000:00000:00001:00000:00000")

bit23 = Image("00000:00000:00000:00000:00000")

file = [bit2, bit3, bit4, bit5, bit6, bit7, bit8, bit9, bit10, bit11, bit12, bit13, bit14, bit15, bit16, bit17,

bit18, bit19, bit20, bit21, bit22, bit23]

while True:

display.show(file, delay=100, wait=False)

sleep(1500)

music.play("B5:2")