while True:
a=input("taban=")
b=input("yukseklik=")
print "alan=", (a*b)/2
Free Python
Translate
14 Nisan 2018 Cumartesi
DÜZGÜN ALTIGENİN ALANINI BULMA
while True:
a=input("bir kenari=")
print "Duzgun altigenin alani=", 6*(a**2)*(3**(1/2.0)/4.0)
13 Nisan 2018 Cuma
DİKDÖRTGENLER PRİZMASININ HACMİNİ BULMA
while True:
a=input("taban kenari gir")
b=input("taban kenari gir")
c=input("yukseklik gir")
print "prizmanin hacmi=", a*b*c
FAKTORİYEL BULMA
while True:
import math
a=input("sayi gir")
b=math.factorial(a)
print "faktoriyeli=", b
DİK ÜÇGENDE HİPOTENÜSÜ BULMA
while True:
import math
a=input("1. dik kenar")
b=input("2. dik kenar")
c=a**2+b**2
print "hipotenus=", math.sqrt(c)
YAZILI ORTALAMASI HESAPLAMA KODU
while True:
a=2
b=3
print a, ",", b
c=input("yazili sayisini sec")
if c==2:
d=input("ilk yaziliyi gir")
e=input("ikinci yaziliyi gir")
print "ortalaman=", (d+e)/2
elif c==3:
f=input("1.yazili")
g=input("2.yazili")
h=input("3.yazili")
print "ortalaman=", (f+g+h)/3
70 ORTALAMA İÇİN FİNALDEN ALMAN GEREKEN NOT
while True:
a=input("vize notunu gir")
b=(70-a*40/100)*10/6
print "Ortalamanin 70 olmasi icin finalden alman gereken not:", b
VİZE FİNAL ORTALAMASINI VE HARF NOTUNU HESAPLAMA KODU
while True:
a=input("vize notunu gir")
b=input("final notunu gir")
c=a*40/100+b*60/100
if c>=90:
print "ortalamaniz:", c, "AA"
elif 90>c>=85:
print "ortalamaniz:", c, "BA"
elif 85>c>=80:
print "ortalamaniz:", c, "BB"
elif 80>c>=75:
print "ortalamaniz:", c, "CB"
elif 75>c>=70:
print "ortalamaniz:", c, "CC"
elif 70>c>=55:
print "ortalamaniz:", c, "DC"
elif 55>c>=45:
print "ortalamaniz:", c, "DD"
elif 45>c:
print "ortalamaniz:", c, "FF"
BÖLÜNEN İÇİNDE KAÇ TANE BÖLEN OLDUĞUNU BULMA
def adana():
r=input("Bolunen sayi")
b=input("Bolecek sayi")
a=r//b
print r, "icinde", a, "tane", b, "vardir"
while True:
adana()
BÖLME İŞLEMİNDE KALAN SAYIYI VEREN KOD
def cember():
r=input("Bolunen sayi")
b=input("Bolecek sayi")
a=r%b
print "kalan:", a
while True:
cember()