Skip to content

Commit 5f71688

Browse files
committed
added bab11_bonus, asci_art, simple login & check userpw
1 parent d16a7b4 commit 5f71688

File tree

5 files changed

+51
-2
lines changed

5 files changed

+51
-2
lines changed

.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/python_basic.iml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bab11_bonus/asci_art/jerapah.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
print("""\
2+
3+
._ o o
4+
\_`-)|_
5+
,"" \
6+
," ## | ಠ ಠ.
7+
," ## ,-\__ `.
8+
," / `--._;)
9+
," ## /
10+
," ## /
11+
12+
13+
""")

bab11_bonus/simple_login.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Simple login by Kucing Item Putih (12 April 2018)
2+
3+
username = input("Username = ")
4+
password = input("Password = ")
5+
if (username == "admin" and password == "admin"):
6+
print("yay, Sucess login!")
7+
else :
8+
print("wrong username / password, pls try again.")

bab11_bonus/userpw.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import os
2+
import header
3+
import json
4+
import getpass
5+
def akunadmin():
6+
z = 'ya'
7+
a = 0
8+
while z == 'ya' :
9+
user = input('Username = ')
10+
p = getpass.getpass('Password = ')
11+
if (user =='admin') and (p =='mimin') :
12+
print ('Selamat Datang',user,'Tekan Enter untuk lanjut')
13+
input()
14+
break
15+
elif (user =='admin') or (p =='mimin') :
16+
print ('Username/Password salah')
17+
else :
18+
print('Password Salah')
19+
a = a+1
20+
if a == 3 :
21+
print ('sudah 3x input')
22+
break
23+
print()
24+
z = input('Input username dan password lagi ? ya/tidak ?')
25+
print()
26+
os.system('cls')
27+
header.header()
28+

0 commit comments

Comments
 (0)