Skip to content

Comments

sprint-1#7

Open
ShamilovR wants to merge 1 commit intomasterfrom
sprint_1
Open

sprint-1#7
ShamilovR wants to merge 1 commit intomasterfrom
sprint_1

Conversation

@ShamilovR
Copy link
Owner

No description provided.

#1 Задание

time_values = '1h 45m,360s,25m,30m 120s,2h 60s'
total_minutes = 0
Copy link
Owner Author

@ShamilovR ShamilovR Jan 12, 2025

Choose a reason for hiding this comment

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

Нужно исправить: не хватает еще одного сплита до цикла, из за этого алгоритм работает не верно

Comment on lines +37 to +41

tester_1 = Tester(name='tester_1', deadline=False)
tester_1.work_hard() # 'tester_1 Можно отдыхать'
tester_2 = Tester(name='tester_2', deadline=True)
tester_2.work_hard() # 'tester_2 Что ж, ещё часок поработаю!'
Copy link
Owner Author

Choose a reason for hiding this comment

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

Нужно исправить: по заданию сказано, что вызовы менять не нужно. А значит редактировать принимаемые параметры методов не нужно

}

world_champions[2022] = 'Аргентина'
print(world_champions.items())
Copy link
Owner Author

Choose a reason for hiding this comment

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

Нужно исправить: требуется формат вывода: год - страна.


new_tasks = ['task_001', 'task_011', 'task_007', 'task_015', 'task_005']
completed_tasks = ['task_002', 'task_012', 'task_006']
completed_tasks.append(new_tasks.pop(-1))
Copy link
Owner Author

Choose a reason for hiding this comment

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

Можно лучше: метод pop по умолчанию берет последний элемент из списка. Если не передавать аргумент -1 то логика работы программы не изменится.

completed_tasks = ['task_002', 'task_012', 'task_006']
completed_tasks.append(new_tasks.pop(-1))
new_tasks.remove('task_007')
print('task_015')
Copy link
Owner Author

Choose a reason for hiding this comment

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

Нужно исправить: в задании сказано вывести последнюю задачу на экран. В случае, когда 'task_015' не будет последней в списке алгоритм отработает не верно. Нужно использовать последний индекс

#5 Задание

class TestCase:
def __init__(self, steps=None, result=None):
Copy link
Owner Author

Choose a reason for hiding this comment

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

Нужно исправить: параметр steps принимает пустой словарь, а не None

result = result

def delete_step(self, step_number, step_text: 0):
self.steps[step_number] = step_text
Copy link
Owner Author

Choose a reason for hiding this comment

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

Нужно исправить: данная реализация ничего не удалит, а лишь перезапишет значение по ключу. Необходимо использовать директиву del

self.steps[step_number] = step_text

def set_result(self, result):
result = result
Copy link
Owner Author

Choose a reason for hiding this comment

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

Нужно исправить: к атрибуту экземляра класса нужно обращаться через self.



tester_1 = Tester(name='tester_1', deadline=False)
tester_1.work_hard() # 'tester_1 Можно отдыхать'

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