Skip to content

Instantly share code, notes, and snippets.

@ShawnHymel
Created August 23, 2016 03:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShawnHymel/bf1104f133e4071cde23b6df1edad353 to your computer and use it in GitHub Desktop.
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
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)
@GunterFerreira
Copy link

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?

@acegriffin
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment