M_Isakichev2-9#327
Conversation
| def solve_task(self): | ||
| a = random.randint(3,6) | ||
| time.sleep(a) | ||
| print("I'm not ready yet") |
There was a problem hiding this comment.
Тот же код есть у родителя. Лучше переиспользовать его.
| (122,144,58,),([7,8,9,], | ||
| ['bbb','cccc'],[7.5,45.23,85.6],) | ||
| ] | ||
| def process(function, arr): |
There was a problem hiding this comment.
Определение функции стоит вынести из данного условия.
| ['bbb','cccc'],[7.5,45.23,85.6],) | ||
| ] | ||
| def process(function, arr): | ||
| list = [] |
There was a problem hiding this comment.
Не стоит называть переменные именами, которые используются библиотекой Python.
| def chooseAnimation(self,anim): | ||
| if anim == 'Running': | ||
| print(f'{self.name} run animation starts') | ||
| if anim == 'flying': |
There was a problem hiding this comment.
Почему здесь и ниже if, а не elif? В чем будет разница?
| num = input('Enter the number') | ||
| j=0 | ||
| for i in num: | ||
| if(len(num) > 5): |
There was a problem hiding this comment.
Не стоит эту проверку повторять для КАЖДОГО символа.
|
|
||
| #task four | ||
|
|
||
| def str_deploy(str): |
There was a problem hiding this comment.
Имеет смысл передавать сюда отдельным параметром опцию, что на что менять, чтоб не было путаницы.
| def deleting_column(list): | ||
| k=0 | ||
| num = int(input('enter the number for deleting column consist of this number')) | ||
| for i in list: |
There was a problem hiding this comment.
list - далеко не самое удачное имя для переменной, т.к. это имя типа.
| [7,8,9,17]] | ||
| l = deleting_column(l) | ||
| print('Matrix after deleting') | ||
| print(l) |
There was a problem hiding this comment.
Однако, если посмотреть на вывод, столбец, как таковой не удаляется, просто вместо чисел в нем остаются пустые элементы.
No description provided.