December 2017
Beginner
412 pages
10h 8m
English
We’ve now seen two types of numbers (integers and floating-point numbers), so we ought to explain what we mean by a type. In Python, a type consists of two things:
For example, in type int, the values are …, -3, -2, -1, 0, 1, 2, 3, … and we have seen that these operators can be applied to those values: +, -, *, /, //, %, and **.
The values in type float are a subset of the real numbers, and it happens that the same set of operations can be applied to float values. We can see what happens when these are applied to various values in Table 1, Arithmetic Operators. If an operator can be applied to more than one type of value, it is called an overloaded ...
Read now
Unlock full access