why are there difference between * and **
def disk_area(radius):
return 3.14*(radius**2)
7.065
Versus
def disk_area(radius):
return 3.14*radius*radius
7.0649999999999995
why are there difference between * and **
def disk_area(radius):
return 3.14*(radius**2)
7.065
Versus
def disk_area(radius):
return 3.14*radius*radius
7.0649999999999995
Exponent operator supports negative, fractional, and complex values:
3 ** -1
5 ** math.sqrt(2)
1j ** (1 + 1j)
You're not going to make any of those happen with *
multiply operators, right?