Skip to content

Instantly share code, notes, and snippets.

@hungryzi
Last active January 10, 2021 18:25
Show Gist options
  • Save hungryzi/d2f892c40e9f18ae35829e95fe2f588f to your computer and use it in GitHub Desktop.
Save hungryzi/d2f892c40e9f18ae35829e95fe2f588f to your computer and use it in GitHub Desktop.
# Trong Python, mot bien ma ta khong co y dinh thay doi thi goi la mot hang so.
# Ten cua hang so duoc viet hoa hoan toan de nguoi doc hieu duoc y dinh do
# cua lap trinh vien
WELCOME_MESSAGE = """
**welcome!!**
__ __
__ \\ / __
/ \\ | / \\
\\|/
_,.---v---._
/\\__/\\ / \\
\\_ _/ / \\
\\ \\_| @ __|
\\ \\_
\\ ,__/ /
~~~`~~~~~~~~~~~~~~/~~~~
"""
WARNING_MESSAGE = """
___________________
| |
| HACKER DETECTED!! |
|___________________|
/^^^/ /]
/ ] / ]
O _______/ ]___ / ]
/ \\_____/ /
O _/ [@] \\ \\ \\
___//_ /.. | | ]
o /o ) \\/ VVVvvv\ | | _/\\ ]
O< )___\\\\_/\\ | / \\ ]
AAA^^^^^ / \\]
\\_________\\ \\_____/
\\ \\
\\____\\
"""
counter = 0
while counter < 3:
passcode = input("What's the passcode? ")
if passcode == '0042':
print(WELCOME_MESSAGE)
break
else:
is_last_try = counter == 2
if is_last_try:
print(WARNING_MESSAGE)
else:
print("Wrong passcode! Please try again!")
counter = counter + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment