Skip to content

Commit fbc4657

Browse files
committed
edit even
1 parent 6152bb9 commit fbc4657

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

brain_games/game_logic.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
def start_game(description, question_func, name):
1+
def start_game(description, question_func, user_name):
22
print(description)
3-
43
rounds_to_win = 3
54
for _ in range(rounds_to_win):
65
question, correct_answer = question_func()
@@ -11,9 +10,9 @@ def start_game(description, question_func, name):
1110
print(
1211
f"'{user_answer}' is wrong answer ;(. "
1312
f"Correct answer was '{correct_answer}'.")
14-
print(f"Let's try again, {name}!")
13+
print(f"Let's try again, {user_name}!")
1514
return
1615

1716
print("Correct!")
1817

19-
print(f"Congratulations, {name}!")
18+
print(f"Congratulations, {user_name}!")

brain_games/scripts/brain_even.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
def main():
77
user_name = welcome_user()
88
start_game(
9-
"Answer 'yes' if the number is even, otherwise answer 'no'.",
9+
"Answer \"yes\" if the number is even, otherwise answer \"no\".",
1010
generate_question,
11-
user_name)
11+
user_name
12+
)
1213

1314

1415
if __name__ == "__main__":

0 commit comments

Comments
 (0)