Skip to content

Conversation

@Ksenia2102
Copy link

No description provided.

Copy link

@alexandrettio alexandrettio left a comment

Choose a reason for hiding this comment

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

Исправить важно только подсчет мальчиков и девочек. Остальное здорово!

delta_30days = datetime.timedelta(days=30)

yesterday = dt_now - delta
today = datetime.datetime.today()

Choose a reason for hiding this comment

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

Эта строчка дублирует 14ую. Можно не исправлять

new_content = content.replace('.', '!')

with open('referat2.txt', 'w', encoding='utf-8') as new_essay:
new_essay.write(new_content)

Choose a reason for hiding this comment

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

great!

writer.writeheader()

for user in user_info:
writer.writerow(user)

Choose a reason for hiding this comment

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

аккуратно и верно

# all_names.append(name['first_name'])

# common_name = collections.Counter(all_names).most_common(1)
# print(f'Самое частое имя среди учеников: {common_name[0][0]}')

Choose a reason for hiding this comment

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

в таком месте лучше не делать [0][0] а распаковать
most_common = common_name[0]
name, amount = most_common

# girls += 1
# return girls

# def count_boys_in_class(clas, names_info):

Choose a reason for hiding this comment

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

Лучше объединить подсчет мальчиков и девочек в одну функцию и возвращать
return boys, girls

Эту правку лучше сделать для практики

]

i = 1
for group in groups:

Choose a reason for hiding this comment

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

Тут можно использовать enumerate() в остальном в этом файле всё ок

total_len_words += len(word)

average_len = total_len_words / len(sentence.split())
print(average_len) No newline at end of file

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