-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswordFish.py
More file actions
31 lines (31 loc) · 764 Bytes
/
swordFish.py
File metadata and controls
31 lines (31 loc) · 764 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
name = ()
null = ()
wrong = 0
while True:
if null == 1 or wrong == 5:
break
print("Who are you?")
name = input()
if name != "Joe":
print("Go away, you're not Joe")
continue
else:
print("Hello, Joe. What is the password? (Hint: it is a fish)")
while True:
if wrong != 0 and wrong < 5:
print("You have "+ str(5- wrong)+ " attempts remaining")
if wrong == 5:
break
password = input()
if password == "I am not Joe":
break
elif password == "swordfish":
null = 1
break
else:
wrong = wrong + 1
continue
if wrong == 5:
print("Access Denied...")
else:
print("Access granted.")