INPUT :
OUTPUT :
Script Python :
import os
def goto(linenum):
global line
line = linenum
def hitung() :
global tun, uang_lembur, gator, gasih
tun = int(jml_anak_a) * 200000
uang_lembur = int(jml_lembur) * int(lembur)
gator = int(gapok) + int(uang_lembur) + int(tun)
gasih = int(gator) - ((int(gator) * 5) / 100)
def printout() :
os.system("cls")
print("")
print("===========================================")
print("= Kuprakapra.blogspot.com =")
print("===========================================")
print("-------------------------------------------")
print(" GAJI KARYAWAN PT.KUPRAKAPRA")
print("-------------------------------------------")
print("NAMA KARYAWANA : ", nama)
print("NIP : ", nip)
print("GOLONGAN : ", gol)
print("JUMLAH ANAK : ", jml_anak, "Anak")
print("JUMLAH JAM LEMBUR : ", jml_lembur, "Jam")
print("")
print("JABATAN :", jab)
print("GAJI POKOK : Rp.", gapok)
print("GAJI LEMBUR : Rp.", uang_lembur)
print("TUNJANGAN : Rp.", tun)
print("GAJI KOTOR : Rp.", gator)
print("GAJI BERSIH : Rp.", gasih)
line = 0
while True:
if line == 0:
os.system("cls")
print("------------------------------------")
print("PERHITUNGAN GAJI KARYAWAN KUPRAKAPRA")
print("------------------------------------")
print("")
nama = input("Masukkan Nama : ")
nip = input("Masukkan NIM : ")
goto(1)
elif line == 1 :
gol = input("Masukkan Golongan : ")
if gol == "1" :
gapok = 10000000
lembur = 100000
jab = "Direktur"
goto(2)
elif gol == "2" :
gapok = 8000000
lembur = 85000
jab = "Manajer"
goto(2)
elif gol == "3" :
gapok = 6500000
lembur = 70000
jab = "Supervisor"
goto(2)
elif gol == "4" :
gapok = 4300000
lembur = 50000
jab = "Operator"
goto(2)
else :
print("Tidak ada dalam pilihan golongan. Input ulang golongan anda.")
goto(1)
elif line == 2 :
jml_anak_a = input("Masukkan Jumlah Anak : ")
jml_anak = jml_anak_a
if int(jml_anak_a) > 3 :
jml_anak_a = 3
nama
jml_lembur = input("Masukkan Jumlah Lembur : ")
hitung()
printout()
goto(3)
elif line == 3 :
print("")
ulang = input("Ulang perhitungan? (y/n) : ")
if ulang == "y" :
goto(0)
elif ulang == "n" :
exit(0)
else :
print("Tidak ada dalam pilihan")
goto(3)
No comments:
Post a Comment