Use Python as a calculator
We are going to try some simple commands in Python. Start an interpreter and wait for the primary prompt, >>>. (It shouldn’t take that long).

Numbers
The interpreter acts as a simple calculator; You can enter an expression and it will write the values.
The syntax is simple: the operators +, -, * and / work as in most languages (for example, Pascal or C); parentheses (()) can be used for grouping. For example:
>>> 2 + 2
4
>>> 50–5*6
20
>>> (50–5*6) / 4
5.0
>>> 8 / 5 # division always returns a floating point number
- 6
Integers (for example 2, 4, 20) are of type int, those with a fractional part (for example 5.0, 1.6) are of type float.