--Originally published at Newbie Programmer
Using python 3 as a calculator
I can use python 3 as a calculator using the interpreter of python, you can do the basic math functions.
The integer numbers ( 23 , 45, 4) have type int , and the others numbers with a fractional part ( 2.5 , 4.34, 3.141592653….) have type float
The division (/) always returns a float number, to do a division to get a type int number you need to put // instead of / , and to calculate the remainder use the %.
In python is possible to use the ** operator to calculate powers, 2**2 is equal to write 2² (At a real calculator).
You can use the equal sign = to assign a value to a variable, if you dont assing a variable, you cant use, and you accredit an error.
In the interactive mode the last printed expression is assigned to the variable _
And, you can round the number if you put the function round(AValuue,Numberofdecimals)
And now, a gif of a taco.