Finding Approximate Pythagorean Triples
CSTA Nifty Assignments 2022
Ronald Greenberg
Matthew Fahrenbacher
George Thiruvathukal
Loyola University Chicago
Niles Twp HS District 219
Loyola University Chicago
A Motivation
Diagonal transfer
of motion in a LEGO
robot
(straddle height,
expand wheelbase,
use gearing to change
power/speed.)
A Motivation
You can count
the holes to
see the side
lengths:
7, 11, 13
Haven't heard of a 7-11-13 right triangle?
Let's use the Pythagorean Theorem to check it:
72 + 112 = 49 + 121 = 170 ≠ 169 = 132
Oops! But, actually, it's close enough that it is easy to construct with a slight deformation of the LEGO pieces.
Programming and Data Analysis
Checking triples with small side lengths to see how close they come to satisfying the Pythagorean Theorem is a good exercise in using nested loops. Then can use a spreadsheet to do things like finding the best triple for a given slope.
Programming is simple enough to do in Scratch as an integration of three units of the Exploring Computer Science high school curriculum (Unit 4: Programming, Unit 5: Computing and Data Analysis, and Unit 6: Robotics).
Some variations
Generate and/or analyze data using other languages such as Java, JavaScript, VBA macros in Excel, UNIX shell commands, etc.
The next slide provides examples of graphical representations of the data generated using JavaScript.
Absolute error or error for different leg lengths