From d13692f50fe63c0aa51db1d96e4c880bee6800bb Mon Sep 17 00:00:00 2001 From: seymasatar <102097523+seymasatar@users.noreply.github.com> Date: Tue, 12 Apr 2022 13:21:12 +0200 Subject: [PATCH] Week-1 --- 1.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 2.py | 35 +++++++++++++++++++++++++++++++++++ 3.py | 17 +++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 1.py create mode 100644 2.py create mode 100644 3.py diff --git a/1.py b/1.py new file mode 100644 index 0000000..938ac91 --- /dev/null +++ b/1.py @@ -0,0 +1,49 @@ +oyuncu_1 = input("1. Oyuncu Adiniz : ") +oyuncu_2 = input("2. Oyuncu Adiniz : ") + + +oyuncu_1_skor = 0 +oyuncu_2_skor = 0 + +tur = 1 + +while tur < 11 : + + oyuncu_1_tercih = input("1. oyuncunun tercihi (T - K - M) : ") + oyuncu_2_tercih = input("2. oyuncunun tercihi (T - K - M) : ") + + if oyuncu_1_tercih == 'T' and oyuncu_2_tercih == 'M' : + print(oyuncu_1 + ", " + str(tur) + ". eli kazandi") + tur += 1 + oyuncu_1_skor += 1 + elif oyuncu_1_tercih == 'T' and oyuncu_2_tercih == 'K' : + print(oyuncu_2 + ", " + str(tur) + ". eli kazandi") + tur += 1 + oyuncu_2_skor += 1 + elif oyuncu_1_tercih == 'K' and oyuncu_2_tercih == 'M' : + print(oyuncu_2 + ", " + str(tur) + ". eli kazandi") + tur += 1 + oyuncu_2_skor += 1 + elif oyuncu_1_tercih == 'K' and oyuncu_2_tercih == 'T' : + print(oyuncu_1 + ", " + str(tur) + ". eli kazandi") + tur += 1 + oyuncu_1_skor += 1 + elif oyuncu_1_tercih == 'M' and oyuncu_2_tercih == 'K' : + print(oyuncu_1 + ", " + str(tur) + ". eli kazandi") + tur += 1 + oyuncu_1_skor += 1 + elif oyuncu_1_tercih == 'M' and oyuncu_2_tercih == 'T' : + print(oyuncu_2 + ", " + str(tur) + ". eli kazandi") + tur += 1 + oyuncu_2_skor += 1 + else: + print("Tercihler ayni. Tekrar edin") + +else: + print("Oyun bitti") + if oyuncu_1_skor > oyuncu_2_skor: + print("{} kazandi. Skor {} - {}".format(oyuncu_1, oyuncu_1_skor, oyuncu_2_skor)) + elif oyuncu_2_skor > oyuncu_1_skor: + print("{} kazandi. Skor {} - {}".format(oyuncu_2, oyuncu_2_skor, oyuncu_1_skor)) + else: + print("Oyun berabere.") \ No newline at end of file diff --git a/2.py b/2.py new file mode 100644 index 0000000..6a99fb4 --- /dev/null +++ b/2.py @@ -0,0 +1,35 @@ +ad = input('Adiniz : ') +soyad = input('Soyadiniz : ') +no = input('Ogrenci numaraniz : ') + +ders_1 = input('Ders 1 : ') +ders_1_vize = int(input('Ders 1 vize notunuz : ')) +ders_1_final = int(input('Ders 1 final notunuz : ')) + +ders_2 = input('Ders 2 : ') +ders_2_vize = int(input('Ders 2 vize notunuz : ')) +ders_2_final = int(input('Ders 2 final notunuz : ')) + +ders_3 = input('Ders 3 : ') +ders_3_vize = int(input('Ders 3 vize notunuz : ')) +ders_3_final = int(input('Ders 3 final notunuz : ')) + +ders_4 = input('Ders 4 : ') +ders_4_vize = int(input('Ders 4 vize notunuz : ')) +ders_4_final = int(input('Ders 4 final notunuz : ')) + +ders_1_ortalama = (ders_1_vize * 0.4) + (ders_1_final * 0.6) +ders_2_ortalama = (ders_2_vize * 0.4) + (ders_2_final * 0.6) +ders_3_ortalama = (ders_3_vize * 0.4) + (ders_3_final * 0.6) +ders_4_ortalama = (ders_4_vize * 0.4) + (ders_4_final * 0.6) + +dersler_ortalama = [ders_1_ortalama, ders_2_ortalama, ders_3_ortalama, ders_4_ortalama] + +print("Sayin {} {}, bu donem almis oldugunuz \n1. {}, \n2.{}, \n3.{} ve \n4.{} derslerinin yil sonu basari durumu asagida sirayla gosterilmistir.".format(ad, soyad, ders_1, ders_2, ders_3, ders_4)) + +for i in dersler_ortalama: + if(i < 50): + print("Kaldı") + else: + print("Geçti") + \ No newline at end of file diff --git a/3.py b/3.py new file mode 100644 index 0000000..6a04a69 --- /dev/null +++ b/3.py @@ -0,0 +1,17 @@ +boy = int(input("Boyunuzu cm olarak giriniz : ")) +kilo = float(input("Kilonuzu tam olarak giriniz : ")) + +bki= kilo /((boy/100)**2) + + +if bki < 25: + print("Beden kitle indeksiniz Normal. Boyle devam edin.") + +elif 25 <= bki < 30 : + print("Beden kitle indeksiniz Fazla Kilolu. Bu gidis gidis degil. Bak soylemedi deme.") + +elif 30 <= bki < 40 : + print("Beden kitle indeksiniz Obez. Yavas ye bogulacan.") + +else: + print("Beden kitle indeksiniz Asiri Sisman. Olmusun aglayanin yok.") \ No newline at end of file