Difference between revisions of "Taylor Series Pi and e"
From WLCS
| Line 14: | Line 14: | ||
# Print out Pi and e | # Print out Pi and e | ||
| − | [File:TaylorSeriesPi.png] | + | [[File:TaylorSeriesPi.png]] |
Revision as of 08:09, 10 November 2015
Objective:
- You will use loops to determine the approximations of mathematical constants
- You will implement the Taylor series approximation of Pi (~3.1415...)
- You will implement the Taylor series approximation of e (~2.178...)
Resources:
Directions:
- Prompt the user for a number N (this will be how many terms you will sum in your approximation)
- Use a while loop to iterate N times (you will need a loop counter -- N is not your loop counter)
- Use several variables to create the summations for Pi and e seen below
- Print out Pi and e
