Skip to content

Commit b17a704

Browse files
committed
fix e101
1 parent 5661acb commit b17a704

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

brain_games/scripts/brain_calc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def main():
2424

2525
if str(answer) != str(correct_answer):
2626
print(
27-
f"'{answer}' is wrong answer ;(. "
28-
f"Correct answer was '{correct_answer}'."
29-
)
27+
f"'{answer}' is wrong answer ;(. "
28+
f"Correct answer was '{correct_answer}'."
29+
)
3030
print(f"Let's try again, {name}!")
3131
return
3232

brain_games/scripts/brain_prime.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
def is_prime(n):
6-
## Проверяет, является ли число простым
6+
# Проверяет, является ли число простым
77
if n < 2:
88
return False
99
for i in range(2, int(n ** 0.5) + 1):
@@ -13,19 +13,19 @@ def is_prime(n):
1313

1414

1515
def generate_question():
16-
## Создает вопрос и правильный ответ
16+
# Создает вопрос и правильный ответ
1717
number = random.randint(1, 100)
18-
## Генерация случайного числа от 1 до 100
18+
# Генерация случайного числа от 1 до 100
1919
correct_answer = 'yes' if is_prime(number) else 'no'
2020
return str(number), correct_answer
2121

2222

2323
def game_logic():
2424
return {
2525
'instructions': (
26-
'Answer "yes" if given number is prime. '
27-
'Otherwise answer "no".'
28-
),
26+
'Answer "yes" if given number is prime. '
27+
'Otherwise answer "no".'
28+
),
2929
'get_question_and_answer': generate_question
3030
}
3131

0 commit comments

Comments
 (0)