Jul-18-2019, 08:04 AM
Some nitpicking about code style:
- It's good to follow naming conventions set for variables and functions in PEP 8:
So instead of
- One should aim to write DRY (Don't Repeat Yourself) code. Therefore
- It's good to follow naming conventions set for variables and functions in PEP 8:
Quote:Function names should be lowercase, with words separated by underscores as necessary to improve readability.
Variable names follow the same convention as function names.
mixedCase is allowed only in contexts where that's already the prevailing style (e.g. threading.py), to retain backwards compatibility.
So instead of
getFactorial
one should have get_factorial
- One should aim to write DRY (Don't Repeat Yourself) code. Therefore
factorial = factorial * x
could be written factorial *= x
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.