Jumat, 14 Mei 2010

Program Sederhana Total Harga


print (" MENU ")
print ("============")
print ("1. Grade 1")
print ("2. Grade 2")
print ("3. Grade 3")
print ("4. Log Out")
print ("============")
print("")
pil=int(input("Masukkan pil Anda [1-4]: "))
if pil==1:
potongan=(25/100)*6500000
total=6500000-potongan
print ("Grade 1")
print ("Biaya Pendaftaran= Rp. 0")
print ("Biaya Kuliah = Rp. 6500000")
print ("Potongan harga = Rp. ",potongan)
print ("------------------------------------")
print ("Total = Rp. ",total)
elsif pil==2:
potongan=(15/100)*6500000
total=6500000-potongan
print ("Grade 2")
print ("Biaya Pendaftaran= Rp. 0")
print ("Biaya Kuliah = Rp. 6500000")
print ("Potongan harga = Rp. ",potongan)
print ("------------------------------------")
print ("Total = Rp. ",total)
elsif pil==3:
potongan=(5/100)*6500000
total=6500000-potongan
print ("Grade 3")
print ("Biaya Pendaftaran= Rp. 100000")
print ("Biaya Kuliah = Rp. 6500000")
print ("Potongan harga = Rp. ",potongan)
print ("------------------------------------")
print ("Total = Rp. ",total)
elsif pil==4:
exit (0)
else:
print ("maaf anda salah

Tidak ada komentar:

Posting Komentar