Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

homework_02_v2 #1260

wants to merge 1 commit into from

Conversation

erinar
Copy link

@erinar erinar commented Mar 23, 2021

No description provided.

even += 1
else:
odd += 1
return (even, odd)
Copy link
Owner

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))
Copy link
Owner

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:
Copy link
Owner

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))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сергей, обращайте внимание на подсказки Пичарма!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants