Raunak stood before the camera, a little shy but excited. “Hi, my name is Raunak, and my favorite color is blue,” he began. “Today, I’ll show you how I made a Magic 8-Ball using micro:bit and Python.”
He explained the Magic 8-Ball as a fun toy that answers yes or no questions at random. “You ask it a question, then it tells you something like yes, no, or maybe,” Raunak said with a smile.
Raunak shared his screen to show the program. “First, I made the micro:bit listen for a button press,” he explained. “When you press it, the program uses random.randint(1, 4) to pick a number from one to four.” He carefully described how each number corresponds to a different answer: if it’s 1, the micro:bit scrolls ‘Yes’; if 2, it shows ‘No’; if 3, ‘Not at all’; and if 4, ‘Sure.’
He stressed the importance of syntax. “You have to put the quotes and parentheses exactly right for it to work,” he said. Raunak also mentioned using the else statement at the end “to catch anything unexpected and avoid errors.”
With a quick demo, he pressed the button. The micro:bit displayed an answer randomly, just like a real Magic 8-Ball. “It’s cool because every time you press the button, it’s something new!”
His teacher and classmates enjoyed his clear, step-by-step explanation. Raunak’s project showed how simple code and randomness can create a playful, interactive experience. Proud of his work, Raunak encouraged everyone to keep coding and learning.