fejezet 5

This commit is contained in:
2021-12-07 13:51:21 +01:00
parent b7f1716b79
commit bc7f8f7f32
2 changed files with 37 additions and 0 deletions

24
derekszog/derekszog.py Normal file
View File

@@ -0,0 +1,24 @@
def derekszogu_e(a,b,c):
derekszog = False
a = int(a)
b = int(b)
c = int(c)
oldalak = [a,b,c]
print(oldalak)
oldalak.sort()
print(oldalak)
oldalak[0] *= oldalak[0]
oldalak[1] *= oldalak[1]
oldalak[2] *= oldalak[2]
print(oldalak)
if(oldalak[0] + oldalak[1] == oldalak[2]):
derekszog = True
return derekszog
print(derekszogu_e(4,3,5))