Python Reading
Key Ideas
- Be able to write a function.
- Be able to call a function.
- Understand function parameters.
- Understand the difference between a fruitful function and a non-fruitful function.
- Understand the difference between a local variable and a global variable.
Active Learning
- Examine house.py and identify appropriate functions that would improve the solution.
- Implement the functions.
- Take a look at montecarol_pi.py and make sure that you understand it fully.
- Add appropriate comments to estimate_pi()
- Is estimate_pi() a fruitful or non-fruitful function? Why?
- Is main() a fruitful or non-fruitful function? Why?
- Play around with the program. How accurate can you get pi to be?
- What's the tradeoff with high accuracy in the estimation of pi? Why?