Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,13 @@ def identify_pos(sentence):
|
|
10 |
|
11 |
def game_logic(sentence, user_input):
|
12 |
correct_answers = identify_pos(sentence)
|
13 |
-
|
|
|
14 |
return True
|
15 |
else:
|
16 |
return False
|
17 |
|
|
|
18 |
def main(sentence, user_input):
|
19 |
if sentence and user_input:
|
20 |
if game_logic(sentence, user_input):
|
|
|
10 |
|
11 |
def game_logic(sentence, user_input):
|
12 |
correct_answers = identify_pos(sentence)
|
13 |
+
words = [word for word, pos in correct_answers]
|
14 |
+
if user_input in words:
|
15 |
return True
|
16 |
else:
|
17 |
return False
|
18 |
|
19 |
+
|
20 |
def main(sentence, user_input):
|
21 |
if sentence and user_input:
|
22 |
if game_logic(sentence, user_input):
|