#MonthOfMaking Day 8

#MonthOfMaking Day 8

micromag

March 8, 2019

March is all about MAKING!!

I have decided to take on the challenge of making a 5-minute micro:bit make every day throughout March.

Day08 – Rock Paper Scissors

Today I have decided to make a Rock Paper Scissors Game. Let’s have a bit of fun for a Friday Let’s get coding!

Python Code

from microbit import *
import random
paper=Image("99999:90009:90009:90009:99999")
scissors=Image("99009:99090:00900:99090:99009")
rock=Image("00000:09990:09990:09990:00000")
while True:
    if accelerometer.is_gesture('shake')
        hand = random.randint(1,3)
        if hand == 1:
            display.show(paper)
        elif hand == 2:
            display.show(rock)
        else:
            display.show(scissors)

EduBlocks Code

EduBlocks code

MakeCode Code

MakeCode

Demo

Final Words

Come back Tomorrow for another fun 5-minute micro:bit make

Loading cart ⌛️ ...