11. Basic Numbers¶
There are two types of numeric data:
int
andfloat
.- Why are there different types?
There are different kinds of data: counters are integers and PI is not.
Operations with integers are much faster.
Floating-point numbers are approximations: their precision has a limit.
11.1. Operator Table¶
Operator |
Operation |
---|---|
* |
Multiplication |
/ |
Division |
** |
Exponentiation |
abs() |
Absolute Value |
% |
Modulus |
// |
Integer Division |
- |
Subtraction |
+ |
Addition |
11.2. Numeric Operators¶
You have attempted of activities on this page