mixed-type arithmetic

Arithmetic combining an int and a float, where Python converts the int to a float so the result is a float.

In more detail

3 + 0.5 is 3.5 and 2 * 3.0 is 6.0. The rule is that the result has the wider of the two types. Numbers and strings never mix automatically; that raises TypeError.

Related terms

Taught in

References