#Buat Tampilan yang mau dicetak
print ("SELAMAT DATANG GROUP 2 DasProg Fried Chicken")
print ("Kode Jenis Potong Harga")
print ("------------------------------")
print ("D DADA Rp.2500")
print ("P PAHA Rp.2000")
print ("S SAYAP Rp.1500")
print ("------------------------------")
#Define variable
byk_jenis = int (input ("Banyak transaksi :"))
listkd_ptng =[]
listbyk_potong = []
#Lakukan perulangan untuk menentukan berapa banyak transaksi
for i in range (byk_jenis):
print ("Transaksi ke : ", i+1)
kd_ptng = input ("Masukkan kode potong D/P/S :")
listkd_ptng.append(kd_ptng)
byk_potong = int (input ("Masukkan banyak potong : "))
listbyk_potong.append(byk_potong)
print ("SELAMAT DATANG GROUP 2 DasProg Fried Chicken")
print ("No Jenis Potong Harga Satuan Banyak Beli Jumlah Harga")
print ("--------------------------------------------------------------------- ")
#Lakukan perulangan untuk memilih Jenis dan Harga
total = 0
for a in range (byk_jenis) :
if (listkd_ptng[a] == "D"):
jenis_ptg = "DADA"
harga = 2500
elif (listkd_ptng[a]== "P"):
jenis_ptg = "PAHA"
harga = 2000
elif (listkd_ptng[a]== "S"):
jenis_ptg = "SAYAP"
harga = 1500
else:
jenis_ptg ="SALAH INPUT KODE"
harga = 0
jmlh_bayar = harga * listbyk_potong[a]
total = total + jmlh_bayar
print (a+1 ," ",jenis_ptg," ",harga, " ",listbyk_potong[a], " Rp.",jmlh_bayar)
print ("--------------------------------------------------------------------- ")
pajak = (10/100 * total)
total_bayar = total + pajak
print (" Jumlah Bayar Rp. ", total)
print (" Pajak 10% Rp.",pajak)
print (" Total Bayar Rp.", total_bayar)
print ("-----------------------------------------------------------------------------")
print ("=== Terimakasih Telah Makan di Group 2 Fried Chicken ===")
Berikut Adalah output nya :