Skip to content

Conversation

@poluninatm
Copy link
Owner

No description provided.

Tatyana added 2 commits January 27, 2019 14:07
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.

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


while len(firms) < cnt:
name = input('Название предприятия: ')
profit_1 = int(input('Прибыль за 1 квартал: '))

Choose a reason for hiding this comment

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

Про цикл рассказал на уроке )))


print('*' * 50)

firmsProfBigger = []

Choose a reason for hiding this comment

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

Имена переменных старайтесь писать в snake_case, например так firms_prof_bigger

firmsProfSmaller = []

for firm in firms:
if firm.year_profit <= avr:

Choose a reason for hiding this comment

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

По условию выводить фирмы с прибылью равной средней не нужно. Тот самый момент, на который просил обратить внимание

# Сумма чисел из примера: ['C', 'F', '1'], произведение - ['7', 'C', '9', 'F', 'E'].
from collections import deque

hToN = {'0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'A': 10, 'B': 11, 'C': 12,

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.

3 participants