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, cwherea² + b² = c²such a triple is primitive when
a,b,c > 0andgcd(a,b,c) = 1geometrically
a, b, crepresent 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