-
Notifications
You must be signed in to change notification settings - Fork 0
Hw5 #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Hw5 #5
Conversation
Dzhoker1
left a comment
There was a problem hiding this 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 квартал: ')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Про цикл рассказал на уроке )))
|
|
||
| print('*' * 50) | ||
|
|
||
| firmsProfBigger = [] |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отличное решение.
Но на имена переменных обращу ваше внимание ещё раз
No description provided.