Skip to content

homework to lesson #1#3

Open
zagidulin wants to merge 1 commit into
masterfrom
lesson_1
Open

homework to lesson #1#3
zagidulin wants to merge 1 commit into
masterfrom
lesson_1

Conversation

@zagidulin
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

@Dzhoker1 Dzhoker1 left a comment

Choose a reason for hiding this comment

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

Оставил комментарии по коду

Comment thread les_1_task_1.py
# 1) Найти сумму и произведение цифр трехзначного числа, которое вводит пользователь.

num = int(input("Введите целое трёхзначное число: "))
i = num//100
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Отличное начало. Не экономьте на пробелах.

Comment thread les_1_task_7.py
n = int(input("Введите длину второго отрезка: "))
o = int(input("Введите длину третьего отрезка: "))

if m + n > o and m + o > n and n + o > m:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Верно!

Comment thread les_1_task_8.py
# 8) Определить, является ли год, который ввел пользователь, високосным или не високосным.

y = int(input("Введите номер года: "))
if y%4:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Похоже в википедию вы не заглядывали. Почитайте 3 правила вычисления високосного года:
Википедия. Високосный год

Comment thread les_1_task_9.py
b = int(input("Введите другое целое число: "))
c = int(input("Введите ещё одно целое число отличное от первых двух: "))

if a < c:
Copy link
Copy Markdown

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