How to Make a Calculator Using Python | Intermediate Python Project

POSTED ON APRIL 10, 2020
A coder uses a normal calculator, thinking about how to recreate it in Python.

Project Overview

In this project, Juni instructor Maya will be showing us how to use Python to build our very own calculator.

Learning outcomes:

Practice using conditionals, type conversion, and while loops.

  • Language: Python

  • Juni Level: Python Level 2

  • Core concepts: While loops, Conditionals, Arithmetic Operations

  • Lines of Code: ~50

  • Difficulty:Easy/Moderate

  • Est. Time: ~15-45min, but this varies by student and how creative you get!

Project Instructions:

Build your own program in Python that functions as a calculator. Think of how a typical calculator works in real life as your starting point, and then brainstorm how to break this down into smaller steps you'll need to add into your code.

This is how Maya broke down a calculator into implementable steps:

  1. The user will input a number.

  2. Then an operation.

  3. Then another number.

  4. And then the program will return the answer.

  5. The calculator will keep asking for input until the user tells it to stop.

Try to do the project on your own first, and get creative with it if you want!

If you get stuck or want to check your code, check out Maya’s solution and tutorial video below.

Project Solution & Tutorial Video

Check your answers or get help by viewing Maya's solution and step-by-step video tutorial:

Maya's solution tutorial:

Want to keep learning?

We hope you enjoyed this project tutorial with Maya!

To keep practicing and learning, please check out all of our coding tutorials on our blog.

Need help?

Looking up your coding questions is one of the best ways to learn!

Another great way to learn is from an experienced coder or instructor. Juni CS instructors like Maya work closely with students ages 8-18, and are specially trained to adapt to each child's unique learning style, pace, and interests.

Read more about our coding courses for kids and curriculum, or speak with a Juni Advisor today by calling (650) 263-4306 or emailing adivsors@learnwithjuni.com to learn which course is best for your child’s coding journey. You can also read more about how we use Scratch to teach coding.


Related Reading