Open cnolmsted opened 5 years ago
awesome, Charles. I like how you used try
/ except
to accept an integer given as a string, how you put this into a separate function :+1:
round(result)
would have been better than int(result)
because int
could convert rounding errors wrongly, like this below (14 instead of 15):
>>> int(14.9999999)
14
binomial.py
This script can be run from the command line from any directory that contains it by ./binomial.py Also it can be imported into python to run any of the defined modules To see options and rules, run either$
./binomial.py --help
or in pythonimport binomial
help(binomial)
git commit containing the script:
ee750898c71defc82d824365844a40b4f243655b
tags
@cecileane @coraallencoleman