Skip to main content
Lecture
Finding Approximate Pythagorean Triples (and Applications to LEGO Robot Building)
CSTA Nifty Assignments in CSTA 2022 Annual Conference
  • Ronald I. Greenberg, Loyola University Chicago
  • Matthew Fahrenbacher, Niles Township High School
  • George K. Thiruvathukal, Loyola University Chicago
Document Type
Other
Publication Date
7-17-2022
Publisher Name
Computer Science Teachers Association
Publisher Location
Chicago, IL
Abstract

This assignment combines programming and data analysis to determine good combinations of side lengths that approximately satisfy the Pythagorean Theorem for right triangles. This can be a standalone exercise using a wide variety of programming languages, but the results are useful for determining good ways to assemble LEGO pieces in robot construction, so the exercise can serve to integrate three different units of the Exploring Computer Science high school curriculum: "Programming", "Computing and Data Analysis", and "Robotics". Sample assignment handouts are provided for both Scratch and Java programmers. Ideas for several variants of the assignment are also provided.

Comments

Author Posting. © CSTA, 2022. This is the author's version of the work. It is posted here by permission of the CSTA for personal use, not for redistribution. The definitive version was published in CSTA Nifty Assignments from the CSTA 2022 Annual Conference, July 2022. http://dx.doi.org/10.6084/m9.figshare.21638066

Creative Commons License
Creative Commons Attribution-Noncommercial-No Derivative Works 3.0
Citation Information
Ronald I. Greenberg, Matthew Fahrenbacher, and George K. Thiruvathukal. Finding approximate pythagorean triples (and applications to LEGO robot building). http://rig.cs.luc.edu/~rig/PythagoreanLegoCSTA-2022 linked from http://csteachers.org/nifty, July 2022, dot:10.6084/m9.figshare.21638066