forked from Pangestu-off/Python-free-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Tugas2.py
49 lines (43 loc) · 1.28 KB
/
Tugas2.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
def menumaskapai():
print("*********************")
print("Menu Maskapai Pesawat")
print("*********************")
print("Pesan Tiket :")
print("[1] Garuda Indonesia")
print("[2] Lion Air")
print("[3] EXIT")
pilihan = input("Masukkan Pilihan :")
if(pilihan == "1"):
garuda()
if(pilihan == "2"):
Lionair()
if(pilihan == "3"):
exit()
if(pilihan > "3"):
menumaskapai()
def garuda():
print("***********************")
print("[1] Jakarta - BANDUNG")
print("[2] BANDUNG - Jakarta")
print("***********************")
pembayaran()
def Lionair():
print("*******************************")
print("[1] Jakarta - Bandung")
print("[2] Tanjung Pinang - Yogyakarta")
print("*******************************")
pembayaran()
def pembayaran():
menuju = input("Pilih Tujuan :")
if(menuju == "2"):
print("Harga : Rp. 900.000")
harga = 900000
if(menuju == "3"):
print("Harga : Rp. 800.000")
harga = 800000
bayar = int(input("Masukkan Nominal Duit Anda :"))
total = bayar - harga
print("Uang Kembalian Anda : Rp.",total)
menumaskapai()
if __name__ == "__main__":
menumaskapai()