In python calculator is at primary prompt. Just write any expression and you get the answer.
- Numbers: do the following a primary command prompt.
So, you have an inbuilt calculator, we can write complex expression, it is always better to enclose them in parenthesis. See example below:
A division operator always leaves the result as float. So 5/2=2.5
Whereas a floor operator (//) discard the fraction part, so 10/3= 3
Other operators are +, -, *, /, %, //, **, =
In python last printed expression is assigned to variablele _
Note that now z =x*y to _ and add 5 to it to get 10*5 + 5 = 55