Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
AntiViruS90 committed Jun 22, 2024
1 parent 1bfc909 commit da1b23e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion brain_games/games/calc_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def math_calc():
if correct_answer == int(player_answer):
print("Correct!")
else:
print(f"'{player_answer}' is wrong answer ;(. Correct answer was {correct_answer}.\n"
print(f"'{player_answer}' is wrong answer ;(. "
f"Correct answer was {correct_answer}.\n"
f"Let's try again, {player_name}!")
return

Expand Down
3 changes: 2 additions & 1 deletion brain_games/games/even_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def even_game():
if correct_answer == player_answer:
print("Correct!")
else:
print(f"'{player_answer}' is wrong answer ;(. Correct answer was {correct_answer}.\n"
print(f"'{player_answer}' is wrong answer ;(. "
f"Correct answer was {correct_answer}.\n"
f"Let's try again, {player_name}!")
return

Expand Down
3 changes: 2 additions & 1 deletion brain_games/games/gcd_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def func_gcd():
if correct_answer == int(player_answer):
print("Correct!")
else:
print(f"'{player_answer}' is wrong answer ;(. Correct answer was {correct_answer}.\n"
print(f"'{player_answer}' is wrong answer ;(. "
f"Correct answer was {correct_answer}.\n"
f"Let's try again, {player_name}!")
return

Expand Down
3 changes: 2 additions & 1 deletion brain_games/games/prgss_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def func_progression():
if missed_num == int(player_answer):
print("Correct!")
else:
print(f"'{player_answer}' is wrong answer ;(. Correct answer was {missed_num}.\n"
print(f"'{player_answer}' is wrong answer ;(. "
f"Correct answer was {missed_num}.\n"
f"Let's try again, {player_name}!")
return

Expand Down
3 changes: 2 additions & 1 deletion brain_games/games/prime_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def func_prime():
if correct_answer == player_answer:
print("Correct!")
else:
print(f"'{player_answer}' is wrong answer ;(. Correct answer was '{correct_answer}'.\n"
print(f"'{player_answer}' is wrong answer ;(. "
f"Correct answer was '{correct_answer}'.\n"
f"Let's try again, {player_name}!")
return

Expand Down

0 comments on commit da1b23e

Please sign in to comment.