-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_114_Practise.py
40 lines (30 loc) · 1.02 KB
/
_114_Practise.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
""" 1. Ornek
# Kullanicidan kisa kenarlari alın ve hipotenüsü hesaplayin
kisaKenar1 = float(input("1.Kisa Kenari Giriniz : "))
kisaKenar2 = float(input("2.Uzun Kenari Giriniz : "))
hipotenus = ((kisaKenar1**2)+(kisaKenar2**2))**0.5
print("Hipotenus : ",hipotenus)
"""
# Kullanicidan direnc ve akim degerini aliniz ve Voltaj degerini bulunuz
voltaj = float(input("Voltaj degerini giriniz : "))
akim = float(input("Akim degerini giriniz : "))
while True:
"""1.Yol
if akim == 0:
akim = float(input("Akim Degeri 0 olamaz!!! Akim degeri giriniz : "))
else:
break
"""
try:
direnc = voltaj / akim
break
except ZeroDivisionError:
akim = float(input("Akim Degeri 0 olamaz!!! Akim degeri giriniz : "))
print("Direnc : " , direnc) #Farkli data type ları print icinde yazarken , kullanmalısın
# Sozluk yazmak
kelimeler = {}
for i in range(1,3):
ing = input("Ingilizce kelimeyi giriniz : ")
tr = input("Turkce anlamani giriniz : ")
kelimeler[ing] = tr
print(kelimeler)