The Python Calculator

Step 6 – Dealing with lower case letters

Code helper image

It's really annoying to have to remember to put a capital letter each time when you enter the maths operator.

There's a trick we can use to deal with this...

  1. You just need to add in a special command at the end of the long input statement
  2. What  .upper() does is convert the input in to capital letter (uppercase letters)
  3. Run your program to test it. Try with both uppercase and lowercase letters. It should now work perfectly.

You could also use  .lower() to convert any input in to lowercase.