Renamed all folders

This commit is contained in:
2021-04-16 16:58:48 +02:00
parent dbc6cfef05
commit 197b3eea8a
62 changed files with 0 additions and 0 deletions

28
009/main.py Normal file
View File

@@ -0,0 +1,28 @@
import os
import numpy as np
# Find the pythagorean triplet that sums to 1000
def checkPythTriplet(a, b, c):
return pow(a, 2) + pow(b, 2) == pow(c, 2)
def main():
print("Hello, this is Patrick")
for b in range(500):
for a in range(b):
c = 1000 - b - a
if b < c and checkPythTriplet(a, b, c):
print(a, b, c, a*b*c)
if __name__ == "__main__":
main()