0

Is (6 * 7) a float. As described, (6 * 7.0) is a float

Unable to understand the term float.

19th Jun 2019, 12:33 PM
Priyanshu Gaurav
2 Respostas
0
A float is a number with decimal points. To have a float output, you need to have at least 1 float in the input. 6 * 7 isn't a float.
19th Jun 2019, 12:57 PM
Airree
Airree - avatar
0
In Python, what ever arithmetic operation you perform on 2 numbers, the result is always float if atleast one of the operands is a float, otherwise it is an integer. (Few exceptions: ZeroDivisionError, xroot from a negative number results a complex number.
19th Jun 2019, 6:21 PM
Seb TheS
Seb TheS - avatar