2 Comments

I truly appreciate your work and find it consistently stimulating. Regarding this topic: I have a bias towards universality, so I believe that including essential mathematical formulae alongside the code would be beneficial. While it's fantastic for readers to learn actionable code, accompanying it with formulae will make them more comfortable when they encounter the same concepts in other resources, such as textbooks.

Also, don't you think that for readability this:

return comb(n, k) * p**k * (1 - p) ** (n - k)

works better than this:

return comb(n, k) * (p**k) * ((1 - p) ** (n - k))

?

Thank you for your work,

Carlo

Expand full comment

The universality of math notation is definitely a feature, so I see your point. About the readability of the Python, it is often a good idea to use parentheses even when they are unnecessary, so you don't rely on the reader knowing the order of operations -- but I could go either way on this one. Thanks for your comment.

Expand full comment