Pythagorean Triples

"Triple the Fun with Pythagoras!"

Stage No:

...loading...

This app explores the fascinating world of Pythagorean triples. A Pythagorean triple consists of three positive integers a, b, and c such that a² + b² = c². These triples can be generated using the formulas:

  • a = x² - y²
  • b = 2xy
  • c = x² + y²

Here, x and y are positive integers where x > y. Copilot suggested that it was Greek mathematician Euclid who first formalized this method for generating triples.

Use this app to learn more about these triples and how they are generated!


We provided Copilot with a Python3 source code file and it used that code to generate this application. Note that the Python3 rendition came from an earlier Java app, which Copilot converted to Python3!

Back to Stage 2

Please enter a valid positive integer (≥ 1).