Moonpreneur Icon

Calculator

MoonCampaign by Viren (7 years)

Likes

Rating

42 days left

Your support will go a long way in encouraging Viren and taking their innovation Calculator to new heights.
Calculator
terms and conditions
:

Calculator

:

Viren

:

Show and Tell

:

Show n Tell

:

Coming Soon

About the Innovator

Viren’s Calculator project smartly uses a Micro:bit to create a simple calculator for young learners, accepting two numbers and an operation via input prompts. It performs addition, subtraction, multiplication, or division, displaying the result—or an error for division by zero or invalid operations—offering a practical and interactive way to explore coding and basic math operations.

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

STORY

Total Views:

Needing help with math homework one day got me thinking, so I decided to create my Calculator project with a Micro:bit to make adding and multiplying easier. I wanted to type in numbers and pick an operation to see the answer right away. It’s been fun learning how to use the Micro:bit to do math for me!


I started my code with a Micro:bit import and set it up to ask me for two numbers and an operation—like “+” or “*”—using input prompts. For example, I enter a first number like 5, then pick “+,” and a second number like 3. My code uses if-elif statements to check the operation: if it’s “+,” it adds them to get 8; if it’s “/” and the second number isn’t 0, it divides; but if I try dividing by zero, it says “Error (Division by Zero).” For anything else, it shows “Invalid Operation.” Then it prints the whole thing, like “The result of: 5 + 3 = 8,” so I can see it all.


I’m excited to make this calculator even better next time! Maybe I can add a button to start it instead of typing, or make the Micro:bit’s LEDs light up with the answer. I could also try adding more operations like squares. I’m happy I’m learning how to code math with my Micro:bit, and I can’t wait to show my friends how it helps with our homework!

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

Comments

You Might Also Like

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