Skip to content

Conversation

@iisat
Copy link
Owner

@iisat iisat commented Nov 13, 2018

No description provided.

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.

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


for i in range(companies):
name = input('Имя компании: ')
q1 = int(input('Прибыль Q1: '))

Choose a reason for hiding this comment

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

Вариант с циклом я показал на уроке. Он короче и не требует дублирования кода.

allprofit = 0

for i in range(companies):
allprofit += all_companies[i].q1 + all_companies[i].q2 + all_companies[i].q3 + all_companies[i].q4

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