Skip to content

Conversation

@ArtemMost
Copy link

No description provided.

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.

Все нормально, учтите в будущем мои замечания.

import matplotlib.pyplot as plt

def poisson(l, n):
if not(l>0 or n>0 or isinstance(n, int)):
Copy link
Owner

Choose a reason for hiding this comment

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

Это лучше переписать в виде if l < 0 or n < 0 or not isinstance(n, int). Но вообще внезапное переназначение переменной без дополнительных сообщений -- плохой тон

n = np.arange(len(distr))
c = distr*n**k
return c.sum()
def av(distr):
Copy link
Owner

Choose a reason for hiding this comment

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

Следите за PEP8

@vongostev vongostev added this to the Ex.2 milestone Oct 28, 2022
@vongostev
Copy link
Owner

Вот почему нельзя переиспользовать функции...
В целом все нормально, но еще посмотрите PEP8, в коде бардак

@vongostev vongostev modified the milestones: Ex.2, Ex.3 Nov 24, 2022
@vongostev
Copy link
Owner

Нормально. Зачет

@vongostev vongostev modified the milestones: Ex.3, Ex.4 Dec 22, 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