iNTERFACEWARE Products Manual > Learning Center > Learning Python > Working With Values and Variables > Arithmetic Operations > Integers and Floating Point Numbers |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
The result of an arithmetic operation is an integer if all of the values in the operation are integers. If any value is a floating point number, the result is a floating point number. For example:
In this example, y holds a floating point number, since a value containing a decimal point has been assigned to it. This means that the result of x * y - z is a floating point number. When result is printed, 32.0 is displayed, not 32. |