Module grscheller.boring_math.cli.pythag3
Entry point for the pythag3 cli script.
Functions
def pythag3_cli() ‑> None
-
Prints tuples of primitive Pythagorean triples.
- Pythagorean triple are
3
integersa, b, c
wherea**2 + b**2 = c**2
- such a triple is primitive when
a, b, c > 0
andgcd(a, b, c) = 1
- geometrically
a, b, c
represent the sides of a right triangle
Usage: pythag3 [m [n [max]]]
# of args Prints all possible triples (a, b, c)
satisfying3
m <= a <= n
anda,b,c <= max
2
m <= a <= n
1
a <= m
0
3 <= a <= 100
- Pythagorean triple are