i typed a small function in python and the code is
def perimeter(side1,side2,side3):
''' (number,number,number)->float
return the sum of side1,side2 and side3
>>>perimeter(1,2,3)
6.0
>>>perimeter(4,5,7.1)
16.1 '''
result = side1+side2+side3
return result
but when i used it , the result was not on the shape of float , it was like the int . how can i make it in float sort ?
( i don't know how to form a the code window here so forgive me )
perimeter = lambda *sides: math.fsum(sides)