Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Харитонова Валерия #31

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

LiraV
Copy link

@LiraV LiraV commented Oct 27, 2022

Апгрейд на первое и второе задание.

@lgtm-com
Copy link

lgtm-com bot commented Oct 27, 2022

This pull request introduces 5 alerts when merging b228471 into 383b921 - view on LGTM.com

new alerts:

  • 3 for Unused import
  • 1 for Except block handles 'BaseException'
  • 1 for Unreachable code

Copy link
Owner

@vongostev vongostev left a comment

Choose a reason for hiding this comment

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

Оба задания принимаю. Учтите на будущее замечания.

#Задание номер 2

with open('test2.txt', 'w+', encoding='utf-8') as f:
for x in (str(y) for y in range(1, 11)): f.write(x + '\n')
Copy link
Owner

Choose a reason for hiding this comment

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

Об этом я уже говорил, если есть двоеточие, должен быть перевод строки.

#Задание3

def average(new_arr): #new_arr заменить на array для тстирования с моментами
#new_arr = np.moments(array, k)
Copy link
Owner

Choose a reason for hiding this comment

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

У Вас очень много ненужных уже комментариев. Перед сдачей лучше их чистить)

return x
if lamda < 0:
raise ValueError
except ValueError:
Copy link
Owner

Choose a reason for hiding this comment

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

Обработку исключений надо проводить так, чтобы под try: catch блок кода был бы минимального размера

@vongostev vongostev modified the milestones: Ex.1, Ex.2 Oct 28, 2022
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