Skip to content

Commit

Permalink
shorted lines
Browse files Browse the repository at this point in the history
Signed-off-by: hikarikumo <[email protected]>
  • Loading branch information
hikarikumo committed Dec 18, 2023
1 parent 4e2db15 commit e707f07
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion brain_games/even_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def check_if_even(number):


def even_wrong_answer(correct):
print(f"'{correct}'- wrong. Correct - '{'no' if correct == 'yes' else 'yes'}.")
print(f"Not '{correct}'. Correct '{'no' if correct == 'yes' else 'yes'}.")


def even_game():
Expand Down
2 changes: 0 additions & 2 deletions brain_games/gcd_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@


def question_gcd():
"""Ask the question and return a tuple (is_correct, gcd_value)."""
random_number1 = random.randint(1, 100)
random_number2 = random.randint(1, 100)
gcd = gcd_calc(random_number1, random_number2)
Expand All @@ -17,7 +16,6 @@ def question_gcd():


def gcd_goal_message():
"""Information about the goal to the user."""
print("Find the greatest common divisor of given numbers.\n")


Expand Down
2 changes: 1 addition & 1 deletion brain_games/prime_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def prime_goal():


def is_prime(number):
divisors = [count for count in range(1, number + 1) if number % count == 0]
divisors = [c for c in range(1, number + 1) if number % c == 0]
return len(divisors) == 2


Expand Down

0 comments on commit e707f07

Please sign in to comment.