Python Program to write Pythagorean Number Logic.
How does this program work?
- This code helps to how to write Pythagorean Number logic.
Here is the code
n = int(input("Maximal Number:"))
for a in range (1,n+1):
for b in range(a,n):
c_square = a**2 + b**2
c = int(sqrt(c_square))
if ((c_square - c**2) == 0):
print(a,b,c)