Skip to content

Lesson 8#4

Open
Rollen1337 wants to merge 2 commits into
mainfrom
lesson_8
Open

Lesson 8#4
Rollen1337 wants to merge 2 commits into
mainfrom
lesson_8

Conversation

@Rollen1337
Copy link
Copy Markdown
Owner

No description provided.

feat: - ФАЙЛЫ С ДШКОЙ И ГНУЛИНУХ 7 УРОК
feat: 8.2.{1..6}
Copy link
Copy Markdown

@mdubakin mdubakin left a comment

Choose a reason for hiding this comment

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

Молодец!

Обрати внимание на:

  • Расширенные операторы присваивания.
  • Нейминг переменных цикла for, когда они не используются.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  1. i не используется
  2. функции range() лучше передать один аргумент 10, чем 2 аргумента 1 и 11
Suggested change
for i in range(1, 11):
for _ in range(10):

Comment on lines 9 to 10
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
print(count)
print(p)
print(count, p, sep="\n")

Comment on lines 10 to 11
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
print(s)
print(mx)
print(s, mx, sep="\n")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
product = product * digit
product *= digit

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Не забывай о расширенных операторах присваивания:

Suggested change
n = n // 10
n //= 10

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Лишняя запятая :)

Suggested change
a, b, = int(input()), int(input())
a, b = int(input()), int(input())

Comment on lines 12 to 13
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
print(count)
print(maximum)
print(count, maximum, sep="\n")

Comment on lines 10 to 11
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
print(count)
print(maximum)
print(count, maximum, sep="\n")

Comment on lines 25 to 30
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
print(count_digit_3)
print(count_last_digit)
print(count_even_digit)
print(total_digit_higher_5)
print(total_digit_higher_7)
print(count_digit_0_5)
print(count_digit_3, count_last_digit, count_even_digit, total_digit_higher_5, total_digit_higher_7, count_digit_0_5, sep="\n")

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