-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCRUD01.py
More file actions
36 lines (31 loc) · 810 Bytes
/
Copy pathCRUD01.py
File metadata and controls
36 lines (31 loc) · 810 Bytes
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
n = 0
nm = []
nim = []
tugas = []
uts = []
uas = []
akhir = []
while True:
nama = input("nama: ")
nm.append(nama)
Nim = input("NIM: ")
nim.append(Nim)
Tugas = input("Tugas: ")
tugas.append(Tugas)
Uts = input("UTS: ")
uts.append(Uts)
Uas = input("UAS: ")
uas.append(Uas)
Akhir = int(Tugas)+int(Uas)+int(Uts)/3
akhir.append(Akhir)
data = ''
while data != 'Y' and data !='T':
data = input("Tambah data?[Y/T]")
n+=1
if data == 'T':
break
print("===============================================")
print("| No | Nama | NIM | Tugas | UTS | UAS | Akhir |")
print("===============================================")
for a in range(n):
print('|',a+1,'|',nm[a],'|',nim[a],"|",tugas[a],"|", uts[a], "|", uas[a], "|", akhir[a], "|")