Skip to main content
Introduction to Coding for Math
From Nothing to Mathematics with Python
Jerimi Ann Walker
Contents
Search Book
close
Search Results:
No results.
Dark Mode
Prev
Up
Next
\(\newcommand{\N}{\mathbb N} \newcommand{\Z}{\mathbb Z} \newcommand{\Q}{\mathbb Q} \newcommand{\R}{\mathbb R} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \definecolor{fillinmathshade}{gray}{0.9} \newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}} \)
Front Matter
1
Introduction
1.1
Basic Operations with Python
1.1.1
Addition, Subtraction, Multiplication, and Division
1.1.2
Powers and Roots
1.1.3
Exercises
1.2
If Statements
1.2.1
Checking Equality
1.2.2
Checking Inequality
1.2.3
Else Statements
1.2.4
Exercises
2
Looping
2.1
While Loops
2.1.1
Example of a While Loop
2.1.2
Exercises
2.2
For Loops
2.2.1
Lists
2.2.2
Ranges
2.2.3
Counting by More than One
2.2.4
Exercises
2.3
More on Lists
2.3.1
Length of a List
2.3.2
Adding Elements to a List
2.3.3
Exercises
3
Mini Projects 1
3.1
Mini Project 1
3.2
Mini Project 2
3.3
Mini Project 3
4
Functions and Libraries
4.1
Functions
4.1.1
A Function with Boolean Output
4.1.2
Quadratic Formula Function
4.1.2
Exercises
Backmatter
Chapter
2
Looping
A loop allows us to repeat code multiple times without having to write it over and over again. There are two main types of loops in python: while loops and for loops. In this section, we will learn how to use both types of loops.
🔗
2.1
While Loops
2.2
For Loops
2.3
More on Lists
🔗