estimation (python, freshmen level)

profilewipe1241

 # Write a program to estimate the value of pi and the value of e.

# In Python, the value of pi is calculated using math.pi and the value

# is 3.141592653589793, and the value of e is calculated using math.e

# and the value is 2.718281828459045

# Your program should first ask the user to choose what to estimate: pi, e, or quit

# Your program should then asks the user to give a precision of the estimate# it should be a very small number, such as 0.0001, or 0.00001.

# You can ask the user to manually enter the precision, or give them a list

# so they can choose from.

# Then your program should output the estimated value vs. the  calculated value

# It also shows the total number of estimates it took to get the value

 # The equations for estimating pi and e are in the pi_estimation_equation.jpg and e_estimation_equation.jpg 

  • 6 years ago
  • 15
Answer(1)

Purchase the answer to view it

blurred-text
  • attachment
    Ass1-1.py