
September 19th, 2012, 08:41 PM
|
|
Registered User
|
|
Join Date: Sep 2012
Posts: 1
Time spent in forums: 34 m 30 sec
Reputation Power: 0
|
|
|
Help Solving Program
The following code is supposed to compute the sum s=∑ M k=1 1 k :
s = 0; k = 1; M = 100
while k < M:
s += 1/k
print s
I am supposed to find out what is wrong with this program and fix/add anything to make it run correctly. Can someone please help me.
Thanks
|