Doing Math with Python: Use Programming to Explore Algebra, Statistics, Calculus, and More!

Doing Math with Python: Use Programming to Explore Algebra, Statistics, Calculus, and More! — page 5
3 Enhanced Projectile Trajectory Comparison Program 56 4 Visualizing Your Expenses 56 5 Exploring the Relationship Between the Fibonacci Sequence and the Golden Ratio 59 3 Describing Data with statistics 61 Finding the Mean 62 Finding the Median 63 Finding the Mode and Creating a Frequency Table 65 Finding the Most Common Elements 66 Finding the Mode 67 Creating a Frequency Table 69 Measuring the Dispersion 71 Finding the Range of a Set of Numbers 71 Finding the Variance and Standard Deviation 72 Calculating the Correlation Between Two Data Sets 75 Calculating the Correlation Coefficient 76 High School Grades and Performance on College Admission Tests 78 Scatter Plots 81 Reading Data from Files 83 Reading Data from a Text File 84 Reading Data from a CSV File 86 What You Learned 89 Programming Challenges 89 1 Better Correlation Coefficient Finding Program 89 2 Statistics Calculator 89 3 Experiment with Other CSV Data 89 4 Finding the Percentile 89 5 Creating a Grouped Frequency Table 90 4 93 algebra anD syMbolic Math with syMPy Defining Symbols and Symbolic Operations 94 Working with Expressions 96 Factorizing and Expanding Expressions 96 Pretty Printing 97 Substituting in Values 100 Converting Strings to Mathematical Expressions 103 Solving Equations 105 Solving Quadratic Equations 106 Solving for One Variable in Terms of Others 106 Solving a System of Linear Equations 108 Plotting Using SymPy 108 Plotting Expressions Input by the User 111 Plotting Multiple Functions 113 What You Learned 115 Programming Challenges 115 1 Factor Finder 115 2 Graphical Equation Solver 115 3 Summing a Series 116 4 Solving Single-Variable Inequalities 117 x Contents in Detail