<
code_by_math*
/>
Home
Lessons
About
Teachers
Challenges
Sandbox
Book
Login
;
There's a lot here. If you
login
we'll track your progress.
New! Coding lessons about
Chance and Probability.
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!
The Cartesian Coordinate System
Zoom in or out
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
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
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 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$
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
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$
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
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
Code with Google Charts
Make a Chart
Make an (x,y) plot
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
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
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
Code with Google Maps
Draw a map
Place a marker
Draw with markers
Find distances
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
Code for your 3D Printer
Make a 3D-printable XY-graph
221 total lessons.