<
code_by_math*
/>
Home
Lessons
About
Teachers
Challenges
Sandbox
Book
Login
There's a lot here. If you
login
we'll track your progress.
We've been adding new lessons and making a lot of improvements! Enjoy!
Start here
Displaying text
Speaking text
Displaying nice looking math
How programs flow
Programming as a calculator
Dividing by zero
Testing divisibility
Literal vs. to-be text
Using absolute values
Using Pi on the computer
Using square roots
Random numbers
Reading text from the keyboard
Getting clicks from the mouse
Square roots and the distance formula
Square roots and the Pythagorean Theorem
Finding Pythagorean Triples
Algebra vs. computer
Simple Graphics and Drawing
Drawing pixels
Choose a plotting color
Clearing the screen
Drawing lines
Drawing circles
Drawing with text
Draw something!
Turtle Graphics and Logo Drawing
Turtle Fractals and Recursive Curves
The Cartesian Coordinate System
Zoom in or out
Infinite Inscribed Squares and Circles
Checkerboard disc coverage
Make the computer talk
Speaking text
Speaking text with different voices
Speaking text at different speeds
Speaking numbers properly
Variables in programming
Introduction
Mathematical expressions with variables
Calculate a tip
Calculate a tip (with keyboard input)
Distance formula with variables
Index Card Geometry and Area
Changing a variable in one line
Rescaling a result
Drawing lines with the mouse
Drawing circles with the mouse
The slope of a line
The for-loop: counting over a range of numbers
Using for-loops to count
More for-loop counting
Make math practice problems
Making math-facts tables
Study the absolute value
Adding numbers like Carl Gauss did
Adding numbers to find Pi
Finding square roots
Iterating a function
Interating the logistic function
Iterate for a square-root
A clever for-loop for Pi
An even more clever for-loop for Pi
What kinds of numbers?
Diverging and converging series
Numbers ending in 1
Number Bases Equivalence
Linear Diophantine equations
Consecutive integer sets
Sum of all digits from 1 to 10,000
The $10 coin change puzzle
The for-loops: making graphs
Make it snow
Graph a line in slope-intercept form
Graph the absolute value
Graph a parabola
Graph a function
The Lorenz Attractor
The two burning candles
The for-loops: Simple computer animation
Animate a single pixel
Animate a more complex shape
Animate with laws of physics
Object with air-drag
Exploding text
Animated text-banner
Growth pattern
The if-statement: Asking true or false questions
Introduction
True/false with variables
Compound true/false questions
The if-statement
Divisibility tester (1)
Divisibilty tester (2)
Checking random numbers
Graphing inequalities (x-axis)
Graphing inequalities (xy-plane)
Graphing systems of inequalities
Throwing darts to find Pi
Solving Quadratic Equations
The Pythagorean Theorem Calculator
Fermat's Last Theorem
Divisibility of numbers $<1000$
Sum of consecutive squares
Father and Son Age Puzzle
Principle of Inclusion-Exclusion
Cryptarithmetic and divisibility
Digit sums and divisibility by 11
The integer geometric progression puzzle
Minimum digit quotient
Functions in programming
Introduction
Returning values
Convert between Celsius and Fahrenheit
Finding the Greatest Common Divisor (GCD)
Reducing fractions with the GCD
A better GCD calculator
Least common multiple (LCM)
Finding common denominators using the LCM
Add fractions and reduce answer to lowest terms
Is a number prime?
The Fibonacci Sequence
The Factorial
Computing Pi using factorials
Testing the derivative
Doing integrals numerically
Using sine and cosine
Introduction
Plot a circle
Plot a star
Plot a sine wave
Test the famous sin/cos identity
Test the sin/cos identity graphically
Make cool polar plots
Coaxing Pi from the computer
Rotate a parabola
Rotating and Reflecting Points
Find sin(x) by adding numbers
Strings of text
Introduction
The length of a string
Comparing strings
Comparing strings (2)
Finding Palindromes
Palindromic squares
Patterns in Pi ($\pi$)
Patterns in Pi ($\pi$) (more)
The while-loop
Introduction
Type some words
Average some numbers
Mouse clicks
You guess my number
I'll guess your number
Solving equations
$\sqrt{n}-\sqrt{n-1}<0.01$
Golden Ratio by Radical Iteration
Arrays
Introduction
Loops and arrays
Arrays and averaging numbers
Arrays and recurrence relations
Arrays and histograms
Histogram Pi's digits
Histogramming uniform rnd nums
Normally distributed rnd nums
Cellular Automatum
Birthday Surprise
Integer-preserving nonlinear recurrence
Card Pickup Passes and Eulerian Numbers
Symbolic math: Doing algebra on the computer
Introduction: combining exponents
Multiplying a polynomial by a monomial
Raising polynomials to some power
Simplify an algebraic expression
Factor a polynomial
Solve equations
Take a derivative
Partial Fractions
Symmetric Polynomials and Vieta's Formula
Polynomial Roots and Box Volume
Radical Exponents Puzzle
Code with Google Charts
Make a Chart
Make an (x,y) plot
Function grapher with crosshairs
Taylor series approximation
Linear vs exponential growth
The bell curve and normal distribution
Scatter plots and linear regression
Damped harmonic oscillations
Introduction to Data Science: Working with data and files
Introduction to data files
Reading data from a file
Reading all data from a file (1)
Reading all data from a file (2)
Testing for the end of file (EOF)
Find the total of some numbers
Find the average of some numbers
Find the maximum value
Find the minimum value
Confusion with max and min
Visualize data with a plot
Dealing with two column data files
Dealing with a line of CSVs
Graph a CSV file of CO2 concentration
Some challenges with CO2 concentration
Mining geographic data
Work with student grades
Reason about math with Prolog and Artificial Intelligence
We've written
a paper
about material in this section.
Introduction to Prolog: Facts and goals
Introduction Part II: Compound facts
Counting in Prolog
Adding two fractions
Divisibility rules
Find the factorial
Taking derivatives
Advice on quadratic equations
Traveling between cities
Coloring a map
Solving a right triangle
Simulating digital circuits (1)
Simulating digital circuits (2)
Simulating digital circuits (3)
Converting units
Reasoning about points and lines (1)
Reasoning about points and lines (2)
Looking for right triangles
Looking for rectangles
Reasoning about Sets and Venn Diagrams with AI
Euclid's GCD and reducing fractions
Knights and Knaves logic puzzles
Truth-tellers, Liars, and Alternators
Contest Map Coloring: Five Regions
Contest Statistics: Mean of a Data Set
Contest Combinatorics: Pairing Numbers
Contest Diophantine: Repeating Decimals
Contest Number Theory: GCD and LCM
Contest Sequences: Arithmetic and Geometric
Contest Counting: Digit String Constraints
Symbolic algebraic simplification
The river crossing puzzle and AI search
Making coin change and backtracking
Cryptarithmetic: TWO + TWO = FOUR
Propositional logic and truth tables
Trendlines and dealing with a list of numbers
Guess your own trendline
Compute the best possible trendline
Compute the r-value for a trendline
A list of numbers: the max, min, and average
A list of numbers: Make a histogram (Part 1)
A list of numbers: Make a histogram (Part 2)
A list of numbers: Plot the histogram (Part 3)
A list of numbers: Testing the standard deviation
Learning about probability using coins and dice
Single coin tosses
Two coin tosses (1)
Two coin tosses (2)
Throwing two dice
Rolling a die until a 6 comes up
The dice game of Craps
Picking blue, white, and red balls
Rolling a dice, twice
Not rolling a 7 or 11
The shape of luck: Sum of two dice
The Gambler's Fallacy and coin streaks
Rolling doubles and going to jail
The coin sequence race
Digit Sum Probability
Random String Cutting
Tournament odds and binomial series
Code to make an animated-GIF
Introduction: Make a flashing animation
Make a point move
Make a line move
Make a circle move
Make complex objects move
Functions make it easier
Riemann sums and calculus
The cycloid and rolling wheel
Times tables and cardioid mandalas
Lissajous curves and harmonics
Code with OpenStreetMap
Draw an OpenStreetMap
Place a marker
Draw with markers
Find distances on Earth
Draw a trail
Code with 3D Graphics
Introduction to 3D graphics
Depth with 3D graphics
3D graphics and the camera
3D graphics and the light source
Drawing in 3D with cubes
Drawing lines in 3D
Drawing polylines in 3D
Code with Sound
Introduction
Compose music
Play a sine sum
Play a chirp
Acoustic beats
Harmonics and timbre
Musical scales and equal temperament
Coding for physics
Bouncing ball and gravity
The inclined plane and friction
The Galton board and bell curve
Newton's cradle and momentum
Projectile motion and trajectory
Coding with Cellular Automata
Conway's Game of Life and emergence
Wolfram's Rule 30 and chaos
The Sierpinski triangle and Rule 90
Forest fires and percolation thresholds
Coding with Chess
Chessboard coordinates and moving pieces
The Eight Queens puzzle and combinatorics
The Knight's Tour and vector geometry
Chess openings, game trees, and loops
Coding with Music & Math
Introduction to Coding Music and ABC Notation
Musical Symmetries: Bach's Geometry & Transformations
The Rubik's Cube: 3D Geometry and Algorithms
Introduction to the 3D Rubik's Cube
Code for your 3D Printer
Make a 3D-printable XY-graph
Parametric 3D print designs (clovers and more)
True 3D printing: helices, springs, and 3D knots
3D printing cups, vases, and bowls with revolve
302 total lessons.