2023-07-14 23:22:01 -05:00
|
|
|
passwords = [
|
|
|
|
'about', 'after', 'again', 'below', 'could',
|
|
|
|
'every', 'first', 'found', 'great', 'house',
|
|
|
|
'large', 'learn', 'never', 'other', 'place',
|
|
|
|
'plant', 'point', 'right', 'small', 'sound',
|
|
|
|
'spell', 'still', 'study', 'their', 'there',
|
|
|
|
'these', 'thing', 'think', 'three', 'water',
|
|
|
|
'where', 'which', 'world', 'would', 'write'
|
|
|
|
]
|
|
|
|
|
|
|
|
final = passwords
|
|
|
|
|
2023-07-14 23:29:10 -05:00
|
|
|
class FoundCondition(Exception):
|
|
|
|
pass
|
|
|
|
|
2023-07-14 23:22:01 -05:00
|
|
|
responses = []
|
|
|
|
for i in range(5):
|
|
|
|
response = [*input("{}th letters: ".format(str(i)))]
|
|
|
|
responses.append(response)
|
|
|
|
|
2023-07-14 23:29:10 -05:00
|
|
|
def check(index, word, responses):
|
|
|
|
if index == 5:
|
|
|
|
raise FoundCondition(word)
|
|
|
|
|
|
|
|
for a in responses[index]:
|
|
|
|
if a == word[index]:
|
|
|
|
check(index + 1, word, responses)
|
|
|
|
|
2023-07-14 23:22:01 -05:00
|
|
|
for word in passwords:
|
2023-07-14 23:29:10 -05:00
|
|
|
try:
|
|
|
|
check(0, word, responses)
|
|
|
|
except FoundCondition as e:
|
|
|
|
print(str(e))
|