Skip to content

M_Isakichev2-9#327

Open
Bear346 wants to merge 6 commits into
IlyaOrlov:MIsakichevfrom
Bear346:MIsakichev
Open

M_Isakichev2-9#327
Bear346 wants to merge 6 commits into
IlyaOrlov:MIsakichevfrom
Bear346:MIsakichev

Conversation

@Bear346
Copy link
Copy Markdown
Collaborator

@Bear346 Bear346 commented Oct 27, 2020

No description provided.

def solve_task(self):
a = random.randint(3,6)
time.sleep(a)
print("I'm not ready yet")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Тот же код есть у родителя. Лучше переиспользовать его.

(122,144,58,),([7,8,9,],
['bbb','cccc'],[7.5,45.23,85.6],)
]
def process(function, arr):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Определение функции стоит вынести из данного условия.

['bbb','cccc'],[7.5,45.23,85.6],)
]
def process(function, arr):
list = []
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Не стоит называть переменные именами, которые используются библиотекой Python.

def chooseAnimation(self,anim):
if anim == 'Running':
print(f'{self.name} run animation starts')
if anim == 'flying':
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Почему здесь и ниже if, а не elif? В чем будет разница?

num = input('Enter the number')
j=0
for i in num:
if(len(num) > 5):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Не стоит эту проверку повторять для КАЖДОГО символа.


#task four

def str_deploy(str):
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Имеет смысл передавать сюда отдельным параметром опцию, что на что менять, чтоб не было путаницы.

def deleting_column(list):
k=0
num = int(input('enter the number for deleting column consist of this number'))
for i in list:
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

list - далеко не самое удачное имя для переменной, т.к. это имя типа.

[7,8,9,17]]
l = deleting_column(l)
print('Matrix after deleting')
print(l)
Copy link
Copy Markdown
Owner

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