Skip to content

Instantly share code, notes, and snippets.

@talhatugsat
Last active January 1, 2022 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talhatugsat/e0b376cc9f654abb6c24aec6038732b1 to your computer and use it in GitHub Desktop.
Save talhatugsat/e0b376cc9f654abb6c24aec6038732b1 to your computer and use it in GitHub Desktop.
python ile üçgen çeşiti hesaplar
kenar1 = int(input("1. Kenar uzunluğu: "))
kenar2 = int(input("2. Kenar uzunluğu: "))
kenar3 = int(input("3. Kenar uzunluğu: "))
sayilar = [kenar1, kenar2, kenar3]
kenar = 0
for i, v in enumerate(sayilar):
for index, sayi in enumerate(sayilar):
if i != index and v == sayi:
kenar = kenar + 1
kenar = kenar/2
if kenar == 1:
print("İkizkenar")
elif kenar == 0:
print("Çeşitkenar")
else:
print("Eşitkenar")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment