New programming concepts
Input, output, and event
Information entering the computer. A button press is an input.
Something the program notices. “Button A pressed” is an event.
Something the computer produces. The face on the LEDs is an output.
input→Program notices
event→Happy face
output
Try it here
Choose the input
Select the same input your program will notice.
Button A shows a happy face.
MakeCode steps
Build the badge
- 1
- 2
Add the A event
Open Input. Drag on button A pressed into the workspace.
- 3
Choose A’s output
Inside that event, add show icon and choose the happy face.
- 4
Add the B event
Add on button B pressed. Inside it, show the sad face.
- 5
Test each path
Press A and B on the simulator. Say the input and output aloud each time.
- 6
Personalize
Choose any two respectful icons: ready/not ready, yes/no, or two feelings.
Optional videos
Watch the official guides
For the teacher
A calm 55-minute plan
Act it out
Teacher says “A”; class shows a happy face.
Name the flow
Input → event → output.
Guided build
Complete A before adding B.
Test and transfer
Every team member presses both buttons.
Personalize
Change one icon and explain why.
Inclusive classroom use
Do not require learners to disclose real feelings. Teams can code classroom signals, yes/no responses, or fictional character emotions instead.
Before you finish