Çevirici II

  |   Kaynak

Bu kodlamada da döngü de bir oluşmuş olabilir.

#!/usr/bin/env python

-- coding:utf-8 --

print  "      Ölçü Birimleri Çevirme Programı'na Hoşgeldiniz!!!"
anamenu1=" (a) Uzunluk Ölçü Birimleri"
anamenu2=" (b) Alan Ölçü Birimleri"
anamenu3=" (c) Ağırlık Ölçü Birimleri"
anamenu4=" (d) Hacim Ölçüleri"
anamenu5=" (e) Tartılar"
secenek1=" (a1) santimetre'cm' >>>>>>>>>>> inç"
secenek2=" (a2) metre'm' >>>>>>>>>>>>>>> yarda"
secenek3=" (a3) kilometre'km' >>>>>>>>>>>> mil"
secenek4=" (a4) inç >>>>>>>>>>> Santimetre'cm'"
secenek5=" (a5) ayak'foot' >>>> santimetre'cm'"
secenek6=" (a6) yarda >>>>>>>>>>>>>>> metre'm'"
secenek7=" (a7) karamili >>>>>>>>>>>> metre'm'"
secenek8=" (a8) denizmili >>>>>>>>>>> metre'm'"
secenek9=" (b1) santimetrekare'cm2'>>> inçkare"
secenek10=" (b2) metrekare(m2) >>>> yarda kare"
secenek11=" (b3) hektar'ha' >>>>>>>>>>>>> acre"
secenek12=" (b4) kilometrekare >>>>>> mil kare"
secenek13=" (b5) inç kare >>>>>>>>>>>>>> 'cm2'"
secenek14=" (b6) ayak kare >>>>>>>>>>>>> 'cm2'"
secenek15=" (b7) yarda kare >>>>>>>>>>>>> 'm2'"
secenek16=" (b8) acre >>>>>>>>>>>>>>>>>>> 'm2'"
secenek17=" (b9) mil kare >>>>>>>>>>>>> hektar"
secenek18=" (c1) gram'gr' >>>>>>>>>>>>>> ounce"
secenek19=" (c2) kilogram'kg' >>>>>>>>>> pound"
secenek20=" (c3) ton >>>>>>>>>>>>>>> küçük ton"
secenek21=" (c4) onunce'oz' >>>>>>>> gram 'gr'"
secenek22=" (c5) pound'Ib' >>>>> kilogram 'kg'"
secenek23=" (c6) küçük ton >>>>>>>>>>>>>>> ton"
secenek24=" (c7) büyük ton >>>>>>>>>>>>>>> ton"
secenek25=" (d1) santimetre küp'cm3'>>>inç küp"
secenek26=" (d2) desimetre küp'dm3'>>>ayak küp"
secenek27=" (d3) metre küp'm3'>>>>>>>yarda küp"
secenek28=" (d4) inç küp>>>>>>>>>>>>>>>>>'cm3'"
secenek29=" (d5) ayak küp>>>>>>>>>>>>>>>>'dm3'"
secenek30=" (d6) yarda küp>>>>>>>>>>>>>>>>'m3'"
secenek31=" (e1) litre'lt'>>>>>>>>>>'galon'ABD"
secenek32=" (e2) hektolitre'hl'>>>>'bushel'ABD"
secenek33=" (e3) 'pint-kuru'ABD>>>>>>>>'litre'"
secenek34=" (e4) 'pint-yat'ABD>>>>>>>>>'litre'"
secenek35=" (e5) 'pint'İngiliz>>>>>>>>>'litre'"
secenek36=" (e6) 'bushel'ABD>>>>>>>>>>>'litre'"
secenek37=" (e7) 'bushel'İngiliz>>>>>>>'litre'"
secenek38=" (e8) 'galon'ABD>>>>>>>>>>>>'litre'"
secenek39=" (e9) 'galon'İngiliz>>>>>>>>'litre'"
while True:
print anamenu1
print anamenu2
print anamenu3
print anamenu4
print anamenu5
soru=raw_input("Lütfen işlem yapacağınız genbiin kodunu girin: ")
while soru!="/u":
if soru=="a":
print "Uzunluk Ölçü Birimleri"
print secenek1,secenek2
print secenek3,secenek4
print secenek5,secenek6
print secenek7,secenek8
if soru=="b":
print "Alan Ölçü Birimleri"
print secenek9,secenek10
print secenek11,"",secenek12
print secenek13,"",secenek14
print secenek15,"",secenek16
print secenek17
if soru=="c":
print "Ağırlık Ölçü Birimleri"
print secenek18,"",secenek19
print secenek20,"",secenek21
print secenek22,"",secenek23
print secenek24
if soru=="d":
print "Hacim Ölçüleri"
print secenek25,secenek26
print secenek27,secenek28
print secenek29,secenek30
if soru=="e":
print "Tartılar"
print secenek31,secenek32
print secenek33,secenek34
print secenek35,secenek36
print secenek37,secenek38
print secenek39
print soru
aciklama="Lütfen sayısal değeri girin: "
sorux=input(aciklama)
if soru=="a1":
sorux
i=sorux0.3937
print sorux,"cm"," :", i," inch"
break
if soru=="a2":
sorux
y=sorux1.0936
print sorux,"m"," :",y," yarda"
break
if soru=="a3":
sorux
mil=sorux0.6214
print sorux,"km"," :",mil," mil"
break
if soru=="a4":
sorux
s=sorux2.5400
print sorux,"İnç"," :",s," cm"
break
if soru=="a5":
sorux
f=sorux0.3048
print sorux,"foot"," :",f," cm"
break
if soru=="a6":
sorux
me=sorux0.9144
print sorux,"yarda"," :",me," m"
break
if soru=="a7":
sorux
met=sorux1609
print sorux,"karamili"," :",met," m"
break
if soru=="a8":
sorux
metr=sorux1852
print sorux," denizmili"," :",metr," m"
break
if soru=="b1":
sorux
si=sorux0.1550
print sorux," cm2"," :",si," inç kare"
break
if soru=="b2":
sorux
my=sorux1.1960
print sorux," m2"," :",my," yarda kare"
break
if soru=="b3":
sorux
haa=sorux2.4711
print sorux," ha"," :",haa," acre"
break
if soru=="b4":
sorux
kmk=sorux0.3861
print sorux," km2"," :",kmk," mil kare"
break
if soru=="b5":
sorux
icm=sorux6.4516
print sorux," inç kare"," :",icm," cm2"
break
if soru=="b6":
sorux
acm=sorux929
print sorux," ayak kare"," :",acm," cm2"
break
if soru=="b7":
sorux
yam=sorux0.8361
print sorux," yarda kare"," :",yam," m2"
break
if soru=="b8":
sorux
acrem=sorux4046.86
print sorux," acre"," :",acrem," m2"
break
if soru=="b9":
sorux
mih=sorux259
print sorux," mil kare"," :",mih," hektar"
break
if soru=="c1":
sorux
gou=sorux0.0353
print sorux," gr"," :",gou," ounce"
break
if soru=="c2":
sorux
kgp=sorux2.2046
print sorux," kg"," :",kgp," pound"
break
if soru=="c3":
sorux
tkt=sorux1.1023
print sorux," ton"," :",tkt," küçük ton"
break
if soru=="c4":
sorux
ongr=sorux28.350
print sorux," onunce"," :",ongr," gr"
break
if soru=="c5":
sorux
pkg=sorux0.4536
print sorux," pound"," :",pkg," kg"
break
if soru=="c6":
sorux
ktt=sorux0.9072
print sorux," küçük ton"," :",ktt," ton"
break
if soru=="c7":
sorux
btt=sorux1.0161
print sorux," büyük ton"," :",btt," ton"
break
if soru=="d1":
sorux
sink=sorux0.061
print sorux," cm3"," :",sink," inç küp"
break
if soru=="d2":
sorux
deak=sorux0.0353
print sorux," dm3"," :",deak," ayak küp"
break
if soru=="d3":
sorux
myk=sorux1.3079
print sorux," m3"," :",myk," yarda küp"
break
if soru=="d4":
sorux
incm=sorux16.390
print sorux," inç küp"," :",incm," cm3"
break
if soru=="d5":
sorux
aydk=sorux28.320
print sorux," ayak küp"," :",aydk," dm3"
break
if soru=="d6":
sorux
yamk=sorux0.7646
print sorux," yarda küp"," :",yamk," m3"
break
if soru=="e1":
sorux
liga=sorux0.2642
print sorux," litre"," :",liga," galon ABD"
break
if soru=="e2":
sorux
hekbu=sorux2.83178
print sorux," hektolitre"," :",hekbu," bushel ABD"
break
if soru=="e3":
sorux
pikl=sorux0.5506
print sorux," pint-kuru ABD"," :",pikl," litre"
break
if soru=="e4":
sorux
piyl=sorux0.4732
print sorux," pint-yat ABD"," :",piyl," litre"
break
if soru=="e5":
sorux
pntl=sorux0.5683
print sorux," pint İngiliz"," :",pntl," litre"
break
if soru=="e6":
sorux
bshl=sorux35.238
print sorux," bushel ABD"," :",bshl," litre"
break
if soru=="e7":
sorux
bshll=sorux36.369
print sorux," bushel İngiliz"," :",bshll," litre"
break
if soru=="e8":
sorux
gall=sorux3.7853
print sorux," galon ABD"," :",gall," litre"
break
if soru=="e9":
sorux
gal=sorux*4.5461
print sorux," galon İngiliz"," :",gal," litre"
break
Comments powered by Disqus