-
Notifications
You must be signed in to change notification settings - Fork 1
/
list_game_toko.py
26 lines (24 loc) · 847 Bytes
/
list_game_toko.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
#Penulis Modul: Nicholas Liem - 16521108
#Judul Modul: List Game
#Tanggal: 17 April 2022
import operasi_array as arr
import constant as c
def list_game_toko(data_game):
temp = arr.copy(data_game)
skema = input(c.sl_skema)
if skema == "tahun+":
sorted_data = arr.sorting_ascd(temp,c.csvID_game_releaseYear)
arr.cetak_tabel(sorted_data)
elif skema == "tahun-":
sorted_data = arr.sorting_dscd(temp,c.csvID_game_releaseYear)
arr.cetak_tabel(sorted_data)
elif skema == "harga-":
sorted_data = arr.sorting_dscd(temp,c.csvID_game_price)
arr.cetak_tabel(sorted_data)
elif skema == "harga+":
sorted_data = arr.sorting_ascd(temp,c.csvID_game_price)
arr.cetak_tabel(sorted_data)
elif skema == "":
arr.cetak_tabel(temp)
else:
print(c.sl_invalid)