k = 1
M = input("Enter an integer: ")
for M in range(k,M):
s = 1/float(M)
print sum(s)
How do I get the sum of s? I keep getting an error message:
File "C:/Python27/summation.py", line 7, in <module>
print sum(s)
TypeError: 'float' object is not iterable