The Python Calculator

Step 7 – Testing the program

All we have left to do is to test that the program works.

Run your code (Run > Run Module) and test it.

There's a lot to test:

  1. Check what happens when each of A, S, M, and D are entered
  2. Check what happens when you don't use a capital letter
  3. Check what happens if you enter something other than A, S, M, or D
  4. Check what happens when you enter really big numbers
  5. Check what happens when one or both of the numbers are negative
  6. Check what happens when one or both of the numbers are 0 (zero)

The program should just about work almost perfectly.

But not quite. There's one thing that will cause a problem. Can you find it and figure out why?