Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (anonymous):

I am trying to write a program that calculates the value of PI using the formula 2 x (2/sqrt2) x (2/[sqrt(2 +(sqrt2))] x 2/[sqrt(2 +(sqrt(2 + sqrt2)))] in python. Any help would be appreciated.

OpenStudy (rbx):

Do you know how to write a basic Pyton program? If yes, then you can do the following 1) Place 'from math import *' at the top of program 2) Replace 'x' with '*' 3) Replace sqrt2 with sqrt(2) and similarly for other sqrt usages. 4) Do not use [ or ], just the ( and ) when writing this expression. ```python 2 * (2/sqrt(2)) * (2/(sqrt(2 +(sqrt(2))))) * 2/(sqrt(2 +(sqrt(2 + sqrt(2))))) ```

OpenStudy (anonymous):

this will help

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!