can't solve an exercise-help me with it
I'm studying python newly and have an exercise that is difficult for me as a
beginner.Here it is :
"Write a program that approximates the value of pi by summing the terms of
this series:
4/1-4/3+4/5-4/7+4/9-4/11+.... The program should prompt the user for n, the
number of terms to sum and then output the sum of the first n terms of this
series."
any help would be appreciated.
benni
.
Relevant Pages
- Re: cant solve an exercise-help me with it
... > I'm studying python newly and have an exercise that is difficult for me as a ... > "Write a program that approximates the value of pi by summing the terms of ... > number of terms to sum and then output the sum of the first n terms of this ... sum += num / den ... (comp.lang.python) - Re: cant solve an exercise-help me with it
... >I'm studying python newly and have an exercise that is difficult for me as a ... >"Write a program that approximates the value of pi by summing the terms of ... >number of terms to sum and then output the sum of the first n terms of this ... Hint2: ... (comp.lang.python) - Re: Does the series 1 - 1/2 - 1/3 + 1/4 + 1/5 - 1/6 - 1/7 + 1/8 + 1/9 + ... converge
... There is a nice exercise in Palka's "An Introduction to Complex ... Function Theory" which answers this question: ... of decreasing positive numbers with limit 0, then the sum ... Prev by Date: ... (sci.math) - Re: cant solve an exercise-help me with it
... >I'm studying python newly and have an exercise that is difficult for me as a ... >"Write a program that approximates the value of pi by summing the terms of ... >number of terms to sum and then output the sum of the first n terms of this ... This isn't a free homework service. ... (comp.lang.python) - Re: Comments needed for attempted proof of a simple integral
... > X" problems aren't so difficult because standard math education has been ... > about solving problems of that nature and I can usually verify answers ... > exercise for me to verify, and there are a lot of those in this book. ... >> My thinking is to translate the integral into a sum, ... (sci.math) |
|