Skip to content

Hw5#5

Open
poluninatm wants to merge 2 commits into
masterfrom
hw5
Open

Hw5#5
poluninatm wants to merge 2 commits into
masterfrom
hw5

Conversation

@poluninatm
Copy link
Copy Markdown
Owner

No description provided.

Tatyana added 2 commits January 27, 2019 14:07
Copy link
Copy Markdown

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

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

Comment thread task_1.py

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

Choose a reason for hiding this comment

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

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

Comment thread task_1.py

print('*' * 50)

firmsProfBigger = []
Copy link
Copy Markdown

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

Comment thread task_1.py
firmsProfSmaller = []

for firm in firms:
if firm.year_profit <= avr:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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

Comment thread task_2.py
# Сумма чисел из примера: ['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,
Copy link
Copy Markdown

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