Skip to content

lesson_060#6

Open
ikrugloff wants to merge 1 commit into
masterfrom
lesson_060
Open

lesson_060#6
ikrugloff wants to merge 1 commit into
masterfrom
lesson_060

Conversation

@ikrugloff
Copy link
Copy Markdown
Owner

No description provided.

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_01.py
print(f'{time.ctime(time.time())}\n')


def show_case(x, level=0):
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_01_1.py
from memory_profiler import profile

# Решето Эратосфена
# With love to https://habr.com/company/mailru/blog/336156
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_01_2.py
return primes


assert (atkin(30) == [2, 3, 5, 7, 11, 13, 17, 19, 23, 29])
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

В этом месте функция вызывается второй раз, поэтому и 2 вывода.

Comment thread task_01_1.py
fp = open('memory_profiler_task_01_1.log', 'w+')


@profile(precision=6, stream=fp)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Про этот файл. Да и следующий тоже.
Шикарно, что вы заинтересовались тему и познакомились с memory_profie.
Вопрос такой же как и в задаче выше. Где итоговая сумма по переменным? )))

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