Hello
I have this now:
It now gives a int, but i would like to see floats. How can integrate
that into the function?
Regards,
--
Guido van Brakel
Life is like a box of chocolates, you never know what you're gonna get
--
I have this now:
def gem(a):
g = sum(a) / len(a)
return g
>
print gem([1,2,3,4])
print gem([1,10,100,1000])
print gem([1,-2,3,-4,5])
g = sum(a) / len(a)
return g
>
print gem([1,2,3,4])
print gem([1,10,100,1000])
print gem([1,-2,3,-4,5])
It now gives a int, but i would like to see floats. How can integrate
that into the function?
Regards,
--
Guido van Brakel
Life is like a box of chocolates, you never know what you're gonna get
--
Comment