Skip to content

Commit c9461c0

Browse files
fixed Makefile
1 parent d7221fe commit c9461c0

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ build:
66
uv build
77
package-install:
88
uv tool install dist/*.whl
9-
make lint:
10-
uv run ruff check brain_games
9+
lint:
10+
uv run ruff check brain-games
11+
fix:
12+
uv run ruff check --fix brain-games
1113
uninstall hexlet-code:
1214
uv tool uninstall hexlet-code

brain_games/scripts/brain_even.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
from random import randint
2-
from brain_games.cli import welcome_user
3-
4-
52

3+
from brain_games.cli import welcome_user
64

75
def main():
86
name = welcome_user()
97

108
flag = True
119
print('Answer "yes" if the number is even, otherwise answer "no".')
1210
n = 0
13-
while n!=3:
11+
while n != 3:
1412
num = randint(1, 100)
1513
if num % 2 == 0:
1614
flag = True
@@ -21,10 +19,10 @@ def main():
2119
answer = input('Your answer: ')
2220
if answer == 'yes' and flag == True:
2321
print('Correct!')
24-
n +=1
22+
n += 1
2523
elif answer == 'no' and flag == False:
2624
print('Correct!')
27-
n +=1
25+
n += 1
2826
else:
2927
if answer == 'yes':
3028
print(f"'yes' is wrong answer ;(. Correct answer was 'no'.\nLet's try again, {name}!")
@@ -36,7 +34,6 @@ def main():
3634
print(f"use only 'yes' or 'no'.\nLet's try again, {name}!")
3735
break
3836

39-
4037
if n == 3:
4138
print(f'Congratulations, {name}!')
4239

0 commit comments

Comments
 (0)