File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 66 uv build
77package-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
1113uninstall hexlet-code :
1214 uv tool uninstall hexlet-code
Original file line number Diff line number Diff line change 11from random import randint
2- from brain_games .cli import welcome_user
3-
4-
52
3+ from brain_games .cli import welcome_user
64
75def 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'.\n Let's try again, { name } !" )
@@ -36,7 +34,6 @@ def main():
3634 print (f"use only 'yes' or 'no'.\n Let's try again, { name } !" )
3735 break
3836
39-
4037 if n == 3 :
4138 print (f'Congratulations, { name } !' )
4239
You can’t perform that action at this time.
0 commit comments