You can perform calculations on numbers in Python using the four main operators:
For addition we use the plus sign.
To subtract numbers we use the dash symbol – (Not an underscore _ )
For multiplication we use an asterisk * which can be made by pressing Shift and 8 on a typical keyboard.
To divide numbers we use a forward slash / (Not a backslash \ )
We don’t have to just calculate with numbers like 89 or 47, we can perform calculations on variables that we have assigned ourselves or variables that have been inputted:
If you look at the above example we can’t just perform a calculation (like number1 + number2) and expect it to save the answer. That is why we have used number3 – it is a variable that saves the answer to number1 plus number2.