Magic 8-Ball

MoonCampaign by Raunak (7 years)

At Moonpreneur, we empower students to turn ideas into reality through hands-on project & product building.
Our MoonCampaigns highlight their creativity, public speaking, presentation skills, and teamwork.

Quarterly MoonCampaigns: Four Innovation and Leadership Showcases Annually by
Every Student—Thousands of Inspiring Learning Stories Unveiled.

Likes

Rating

49 days left

Your support will go a long way in encouraging Raunak and taking their innovation Magic 8-Ball  to new heights.
Magic 8-Ball
terms and conditions
:

Magic 8-Ball

:

Raunak

:

Show and Tell

:

Show n Tell

:

Coming Soon

About the Innovator

Raunak introduced his Magic 8-Ball project, coded using MicroPython on the micro:bit. He explained the concept of the Magic 8-Ball as a device that answers yes/no questions randomly. His program uses button press input to generate a random number between 1 and 4 to decide the answer. The code includes conditional statements to display responses like "Yes," "No," "Not at all," or "Sure." Raunak emphasized the importance of randomness by using the random.randint function and proper syntax for button inputs and conditional checks. He acknowledged the usefulness of an else statement to avoid errors. His clear explanation showcased understanding of basic programming logic.

Want your child to be part of an innovative and creative competition?

STORY

Total Views:

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.

Every child is gifted. Discover how yours can innovate and lead
Feedback

You Might Also Like

Every child is gifted. Discover how yours can innovate and lead