-
Notifications
You must be signed in to change notification settings - Fork 0
/
program_v2.py
56 lines (49 loc) · 2 KB
/
program_v2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#Prosedur Pokok
def pokok(jam_kerja):
gaji_pokok = 20000
if jam_kerja > 7:
gaji_lembur = (jam_kerja - 7) * gaji_pokok * 1.5
gaji_pokok += gaji_lembur
return gaji_pokok
#Prosedur Lembur
def lembur(jam_kerja):
gaji_lembur = 0
if jam_kerja > 7:
gaji_lembur = (jam_kerja - 7) * 20000 * 1.5
return gaji_lembur
#Prosedur Makan
def makan(jam_kerja):
uang_makan = 0
if jam_kerja >= 8:
uang_makan = 5000
return uang_makan
#Prosedur Jasa
def jasa(jam_kerja):
uang_transport_lembur = 0
if jam_kerja >= 9:
uang_transport_lembur = 4000
return uang_transport_lembur
#Masukkan data
NIP = "312310505"
Nama = "Muhammad Agisna Yudiansyah"
Jumlah_jam_kerja = 17
#Proses dan Cetak
gaji_pokok = pokok(Jumlah_jam_kerja)
gaji_lembur = lembur(Jumlah_jam_kerja)
uang_makan = makan(Jumlah_jam_kerja)
uang_transport_lembur = jasa(Jumlah_jam_kerja)
total_gaji = gaji_pokok + gaji_lembur + uang_makan + uang_transport_lembur
print("LAPORAN GAJI HARIAN KARYAWAN")
print("PT.XYZ")
print("Bulan : November 2023")
print()
print("====================================================================================================================")
print("| NIP | Nama | Jam Kerja | Gaji Pokok | Lembur | Uang Makan | Transport Lembur |")
print("====================================================================================================================")
print("| | | | | | | |")
print(f"| {NIP} | {Nama} | {Jumlah_jam_kerja} Jam | Rp. {gaji_pokok} | Rp. {gaji_lembur} | Rp. {uang_makan} | Rp. {uang_transport_lembur} |")
print("| | | | | | | |")
print("====================================================================================================================")
print()
print(f"Total Gaji : {total_gaji}")
print()