CS 135/Additional Materials/Chapter 2

From Worcester State University Computer Science Department Wiki
< CS 135‎ | Additional Materials
Revision as of 18:06, 4 October 2016 by Hanan Ibraheim (Talk | contribs) (Section 2.3 More about the math Module)

Jump to: navigation, search

Resources are grouped by sections of the chapter. When adding a new resource, please try to add it to the appropriate section.

Section 2.1 Objectives

Section 2.2 What is Pi? http://www.livescience.com/29197-what-is-pi.html 9/21/16 created in 2013 This resource is very helpful/useful because this website has a great deal of details on pi, the history of pi such as where and when it was created, and even includes a diagram of pi being represented in the equation of finding the circle's circumference. It has all the information you need about pi right in front of you without having to search through chapters in the book. Ryan Connor

Section 2.3 More about the math Module

https://www.youtube.com/watch?v=nm92ZoCkYoo this video is very useful because it explains what libraries are, their uses, and how to access them. Moreover, it explains how to load the random module which I personally had trouble with. Furthermore, it shows how the randint function works and how to use it. Posted 10/4/2016

Section 2.4 The Archimedes Approach

Section 2.4.1 The Python Implementation

Section 2.4.2 Developing a Function to Compute Pi

Section 2.5 Accumulator Approximations

Section 2.5.1 The Accumulator Pattern

"For Loops in Python" https://www.youtube.com/watch?v=9LgyKiq_hU0 (created 30 June 2011) This resource is a video discussing how the range function works and how this is applied to 'for loops'. It then provides a detailed example and explanation of how 'for loops' are used in an accumulation of sums. (added by Nicole Daury - 3 October 2016)

Section 2.5.2 Summation of Terms: The Leibniz Formula

Section 2.5.3 Product of Terms: The Wallis Formula

Section 2.6 A Monte Carlo Simulation

Section 2.6.1 Boolean Expressions

Section 2.6.2 Compound Boolean Expressions and Logical Operators

"Conditional Execution" - http://www.pythonlearn.com/html-008/cfbook004.html - created in 2013 - This resource is an online book that provides plenty of examples of Boolean expressions and Logical Operator Behaviors to help better understand the programming. - Jennifer Recalde - 3 October, 2016. https://www.tutorialspoint.com/python/python_if_else.htm This website explains a little more and gives examples of how to use ifelse statements along with using elif.Not only does this website show you a diagram of how to structure the statements but it also then gives you an example with real numbers so you can understand more clearly how it works. -Taylor Hutchings

Section 2.6.3 Selection Statements

if, else and elif statements https://www.youtube.com/watch?v=ric82V2s2z4 This video explains what a if,else and elif statement is. Also shows an example of using the if,else, and elif statements. Video posted Sep 29, 2015. Megan Bellve October 3,2016

Section 2.6.4 Completing the Implementation

Number of Darts Method: https://www.youtube.com/watch?v=p1oQVHfg0Gg This video shows a way you can approximate pi by using the dart method like we did in class, but it is somewhat different from how we did it. (Chantal Thomas 10/3/16)

Section 2.6.5 Adding Graphics

Section 2.7 Summary