-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask01.py
More file actions
38 lines (30 loc) · 1.03 KB
/
task01.py
File metadata and controls
38 lines (30 loc) · 1.03 KB
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
# import library python
from os import system, name
# kode warna
rt = '\033[0m'
yl = '\033[93m'
lc = '\033[96m'
gr = '\033[32m'
pu = '\033[35m'
# fungsi clear terminal
def clear():
# jika os windows
if name == 'nt':
_ = system('cls')
# jika os mac / linux
else:
_ = system('clear')
# trigger clear terminal
clear()
# dekorasi
print("\n\t{}------------------------{} Input Data {}-------------------------" .format(pu,rt,pu))
# meminta input dari user
nama = input("\n\t{}[{}?{}] Masukkan nama anda : {}" .format(rt,yl,rt,lc))
kelas = input("\t{}[{}?{}] Masukkan kelas anda : {}" .format(rt,yl,rt,lc))
jurusan = input("\t{}[{}?{}] Masukkan jurusan anda : {}" .format(rt,yl,rt,lc))
# dekorasi
print("\n\t{}-----------------------{} Output Data {}-------------------------" .format(pu,rt,pu))
# menampilkan output
print("\n\t{}[{}√{}] Nama : {}" .format(rt,gr,rt,yl) + nama)
print("\t{}[{}√{}] Kelas : {}" .format(rt,gr,rt,yl) + kelas)
print("\t{}[{}√{}] Jurusan : {}" .format(rt,gr,rt,yl) + jurusan + rt)