Created
August 23, 2016 03:50
-
-
Save ShawnHymel/bf1104f133e4071cde23b6df1edad353 to your computer and use it in GitHub Desktop.
Just like the example code, but it shows a confused face when the buttons are pressed simultaneously
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from microbit import * | |
while True: | |
if button_a.is_pressed(): | |
if button_b.is_pressed(): | |
display.show(Image.CONFUSED) | |
else: | |
display.show(Image.HAPPY) | |
elif button_b.is_pressed(): | |
display.show(Image.SAD) | |
else: | |
display.show(Image.MEH) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
from microbit import *
while true:
if_button_a.is_pressed():
if button_b.is_pressed():
display.show(Image.CONFUSED)
else:
display.show(Image.HAPPY)
elif button_b.is_pressed():
display.show(SAD)
elif button_a.is_pressed():
display.show(Image.MEH)
Is this right?