Skip to content

Conversation

@AlexN-github
Copy link
Owner

Выполнил

Copy link

@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.

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

# всех предприятий) и отдельно вывести наименования предприятий, чья прибыль выше среднего и ниже
# среднего.

import collections

Choose a reason for hiding this comment

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

Отличный вариант решения

for j in range(4):
prib = int(input('Введите прибыль за квартал №{0} '.format(j)))
ent[name].append(prib)
avg_arr = [sum(ent[x])/4 for x in ent]

Choose a reason for hiding this comment

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

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

return counter

def get_hex_result(coll):
perenos = 0; res = ""

Choose a reason for hiding this comment

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

Привычки из других ЯП неискоренимы ;-)

coll[i] = coll[i] % 16
else:
perenos = 0
res = hex(coll[i])[2:].upper() + res

Choose a reason for hiding this comment

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

Если придираться, то можно тут и ниже вставить текст задания "Примечание: Если воспользоваться функциями hex() и/или int() для преобразования систем счисления, задача решается в несколько строк. Для прокачки алгоритмического мышления такой вариант не подходит. Поэтому использование встроенных функций для перевода из одной системы счисления в другую в данной задаче под запретом."
Но не будем придираться. Работает отлично.

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.

3 participants