Skip to content

first commit#5

Open
Barrakuda8 wants to merge 2 commits into
mainfrom
lesson5
Open

first commit#5
Barrakuda8 wants to merge 2 commits into
mainfrom
lesson5

Conversation

@Barrakuda8

Copy link
Copy Markdown
Owner

No description provided.

Comment thread task1.py

print(f'Средняя годовая прибыль всех предприятий: {average}')
print(f'Предприятия, с прибылью выше среднего значения: {above_average}')
print(f'Предприятия, с прибылью ниже среднего значения: {below_average}')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

реализовали через namedtuple, как мы и обсуждали на уроке

Comment thread task2.py
second = list(input('Введите второе шестнадцатиричное число: '))
print(f'Сумма чисел равна: {list(hex_sum(first, second))}')
print(f'Произведение чисел равно: {list(hex_mult(first, second))}')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

реализовали через defaultdict

Comment thread task2_2.py
first = hex_input('Введите первое шестнадцатиричное число: ')
second = hex_input('Введите второе шестнадцатиричное число: ')
print(f'Сумма чисел равна: {HexNumber(first) + HexNumber(second)}')
print(f'Произведение чисел равно: {HexNumber(first) * HexNumber(second)}') No newline at end of file

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 task3.py Outdated
print(timeit('lst_fulfill_left()', number=10000, globals=globals()))
print(timeit('deq_fulfill_left()', number=10000, globals=globals()))
print(timeit('lst_pop(lst_a)', number=100000, globals=globals()))
print(timeit('deq_pop(deq_a)', number=100000, globals=globals())) No newline at end of file

@DmitryChitalov DmitryChitalov May 15, 2021

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

нет полной аналитики
ф-ци popleft, extendleft
нет аналитики одинаковых операций списка и дека

Comment thread task4.py
print(timeit('dct_get(dct_a)', number=100000000, globals=globals()))
print(timeit('ord_get(ord_a)', number=100000000, globals=globals()))
print(timeit('dct_search(dct_a)', number=100000000, globals=globals()))
print(timeit('ord_search(ord_a)', number=100000000, globals=globals())) No newline at end of file

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