pythag3.cli

Program pythag3 outputs lists of primitive triples.

boring_math.pythagorean_triples.cli.pythag3_cli.pythag3() None

Prints tuples of primitive Pythagorean triples.

  • Pythagorean triples are three integers a, b, c where + =

  • such a triple is primitive when a,b,c > 0 and gcd(a,b,c) = 1

  • geometrically a, b, c represent the sides of a right triangle

Usage: pythag3 [m [n [max_side_length]]]

# of args

Prints all possible triples (a, b, c) satisfying

0

3 <= a <= 100

1

3 <= a <= m

2

m <= a <= n

3

m <= a <= n and a,b,c <= max_side_length