diff --git a/2.Hafta-Odev1.py b/2.Hafta-Odev1.py new file mode 100644 index 0000000..a10509a --- /dev/null +++ b/2.Hafta-Odev1.py @@ -0,0 +1,15 @@ +print("@@@Sansli sayilari bulma programina;Hosgeldiniz@@@") +x = int(input("Lutfen bir deger giriniz: x=> ")) + +main_list = list(range(1,x+1)) + +i = 2 + +while True: + if i < len(main_list): + del main_list[i-1:x:i] + i += 1 + + else: + print(">>>Sizi gidi sanslilar :))) <<< {}".format(main_list)) + break \ No newline at end of file diff --git a/2.Hafta-Odev2.py b/2.Hafta-Odev2.py new file mode 100644 index 0000000..a074758 --- /dev/null +++ b/2.Hafta-Odev2.py @@ -0,0 +1,24 @@ +A=[1,2,3,4,5] +k=int(input("Lutfen elemanlari kaydirmak istediginiz degeri giriniz:")) + +n=len(A) +C=[None] * n + +for i in range(n): + newIndex = (i + k) % n + C[newIndex] = A[i] + +print(C) + + + + + + + + + + + + + diff --git a/2.Hafta-Odev3.py b/2.Hafta-Odev3.py new file mode 100644 index 0000000..f3d0ce6 --- /dev/null +++ b/2.Hafta-Odev3.py @@ -0,0 +1,17 @@ +metin=input("Lutfen bir cumle yaziniz:") + +metin2={} + +for i in metin: + letter={i:metin.count(i)} + metin2.update(letter) + +bosluksil = metin2.pop(' ') + +liste = list() + +for i in metin2: + tuple = (str(i), metin2[i]) + liste.append(tuple) + +print(liste) diff --git a/2.Hafta-Odev4.py b/2.Hafta-Odev4.py new file mode 100644 index 0000000..a55be6b --- /dev/null +++ b/2.Hafta-Odev4.py @@ -0,0 +1,43 @@ +strA = str(input("Kelime_1:")) +strA = strA.lower() + +strB = input("Kelime_2:") +strB = strB.lower() + +punctuation = "!@#$%^&*()_+<>?:.,;" + +for c in strA: + if c in punctuation: + strA = strA.replace(c, "") + +for c in strB: + if c in punctuation: + strB = strB.replace(c, "") + +A = set(strA) +B = set(strB) + +A_KES_B = list(A.intersection(B)) +sorted(A_KES_B) +print("A ve B'de ortak bulunan harfler:") +print([''.join(A_KES_B)]) + +A_FARK_B = list(A - B) + +sorted(A_FARK_B) +print("A'da olup B'de olmayan harfler:") +print([''.join(A_FARK_B)]) + +B_FARK_A = list(B - A) +print("B'da olup A'de olmayan harfler:") +print([''.join(B_FARK_A)]) + +print([''.join(A_KES_B)], [''.join(A_FARK_B)], [''.join(B_FARK_A)]) + + + + + + + + diff --git a/Boy_Kilo.py b/Boy_Kilo.py new file mode 100644 index 0000000..eefac7a --- /dev/null +++ b/Boy_Kilo.py @@ -0,0 +1,20 @@ +print("*<*>* Vucut kitle indeksi hesaplama programi:Hosgeldiniz *<*>*") + +boy = int(input("Boyunuzu giriniz (cm):")) +kilo = float(input("Kilonuzu giriniz (kg):")) + +vki = kilo / ((boy*boy) / 10000 ) + +if vki<25: + print("Vucut kitle endeksiniz {}, VKI=Normal".format(vki)) +elif 25