-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
homework_02_v2 #1260
base: master
Are you sure you want to change the base?
homework_02_v2 #1260
Conversation
even += 1 | ||
else: | ||
odd += 1 | ||
return (even, odd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
зачем здесь скобки??
|
||
n = int(input("Введите целое число: ")) | ||
print("Запишем наоборот цифры числа ", n) | ||
print(reverse(n)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
стиль
n = int(input(f"Введите число от 1 до {MAXN}: ")) | ||
except ValueError: | ||
continue | ||
if n >= 1 and n <= MAXN: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify chained comparison
|
||
print(f"Считаем сумму {n} членов арифметической прогресии") | ||
print("Непосредственно: ", arith_sum(n)) | ||
print("По формуле: ", exact_sum(n)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сергей, обращайте внимание на подсказки Пичарма!
No description provided.