LEGO Python Coding

Your Ninja's Showcase

Your Ninja wrote real Python code this week to control LEGO SPIKE Prime robots — there's a lot to celebrate!

The SPIKE Prime kits stay at the dojo. Your Ninja walked you through their favorite projects at our Friday Camp Celebration — keep that conversation going at home and ask them to retell their proudest moment of the week.

What We Covered This Week

Throughout the camp, Ninjas wrote real Python code — the same language used at NASA, Netflix, and modern data-science teams — to control LEGO SPIKE Prime robots. By Friday they had touched all four SPIKE Prime sensors plus variables, functions, loops, and conditionals. Click any topic to expand.

Python Foundations & Robot Hand Relay
  • Toured the Python Canvas — imported libraries, variables, executable code, and the console for debugging
  • Learned Pair Programming — Driver (types code) and Navigator (checks code, helps debug), rotating roles throughout
  • Wrote their first lines of Python — showed images on the Hub light matrix, wrote text, and played beeps with parameters
  • Debugged intentional errors — name errors, syntax errors, attribute errors, and value errors
  • Built a Robot Hand and coded it to open and close on button press — using a while True: loop so it works repeatedly
Motors & Smart Bike
  • Learned how robots move — motors rotate forward and backward, measured in degrees
  • Compared Medium and Large motors — speed vs. power trade-offs
  • Coded a motor to move three different ways — by time, by degrees, and to a specific position
  • Built a Smart Bike with two motors and coded it to move along a programmed path
  • Used the Motion Sensor to detect when the bike was going uphill — and slow it down
Sensors & Robotics Competition
  • Met three SPIKE Prime sensors — Force, Color, and Distance
  • Built a driving base with two motors and coded it to respond to the Force Sensor — touch to move, release to stop
  • Swapped to the Color Sensor — move on green, stop on red
  • Wrapped with a Robotics Competition — teams put their sensor-driven robots head-to-head
Step Counter & Robot Coach
  • Met the Motion Sensor — the fourth and last SPIKE Prime sensor of the week
  • Built a step counter that tracks steps as the robot moves — reinforcing variables and counters
  • Wrote functions and used parameters to make the count more flexible
  • Designed a Robot Coach — coded the robot to demonstrate fitness routines on cue
Obstacle Course & Camp Celebration
  • Walked through the Engineering Design Process — brief, brainstorm, plan, build, test, refine
  • Built an obstacle course for their robot to navigate
  • Designed an Obstacle Bot to run the course — combining everything from the week (motors, sensors, loops, functions)
  • Showcased their obstacle course run at the Friday Camp Celebration — parents came to watch the bots in action

What's Next?

Want your ninja to keep building? Code Ninjas® West Katy's CREATE program turns the spark of camp into a year-round 9-Belt journey — from white belt to black, building real games week after week with their own Code Sensei®. New students can start with our Summer of Code promo: 2 months for $299, ages 8–14. Promotion ends June 30.

Or come back for a FREE 30-minute trial to see if year-round is the right fit for your family.

Sign up for Summer of Code » Book a free trial »

Leave a Google Review

Hey there, Code Ninjas family — we'd love your help.

If your ninja had a great week, a 5-star Google review takes 30 seconds and helps another family find us.

★★★★★ Leave a Google review →

Show us your review at pickup and your ninja picks a little Code Ninjas thank-you — wristband, pencil, lanyard, or another ninja goodie. Hi-Yah!

Moments in the Dojo

Feel free to call or text us during business hours. Please note: our doors open only when classes are in session.

Copyright © 2026, Code Ninjas West Katy.
All rights reserved.