Build a Robot Buddy!
Can you build a robot buddy from simple shapes?
Real Python code
This is the code from the video. Read it out loud like a recipe, one line at a time!
print("1. Place rectangle body")
print("2. Place square head")
print("3. Place eyes on head")
print("4. Check your buddy")
Quiz time!
Which order keeps the paper eyes visible?
Yes! Put the eyes on top of the head! Not quite. Have another go!Where else does order matter?
Drawing
Background first, details on top
Games
Set the starting score before play
Animation
Pictures play in a chosen order
Same shapes, better sequence
The ordering bug
- Eyes before head
- Head covers eyes
- Picture doesn't match
The tested fix
- Head before eyes
- Eyes stay on top
- Check the result
A sequence is steps in order!
Try it yourself!
Arrange ready-made paper shapes into a robot, say the steps aloud, then swap the head and eyes steps. Ask a grown-up to prepare shapes if needed.
Bit is working on the next one: Events: make your robot wave