The Python Calculator

The Calculator

We'll make a calculator that takes two integers and performs one of the basic mathematical operators on them: addition; subtraction, multiplication; or division.

This isn't too difficult, but it does introduce a couple of things that are slightly tricky.

Idle menu helper imageUsing Python

Open IDLE.

  1. You need to find and open IDLE (Python 3.8 64-bit)
  2. Once it opens, you'll have a window with some writing in it
  3. IMPORTANT – click File > New File. This opens a new window with nothing at all in it. This is where you'll write your program

The IMPORTANT bit is important!

If you try and write a program in the window with words in it, you won't be able to save it properly. Which would be bad.