rmtrane / 679_notes

0 stars 0 forks source link

binomial.py script #4

Open rmtrane opened 5 years ago

rmtrane commented 5 years ago

@cecileane @coraallencoleman

See binomial.py in the python_homework/ for the script that includes the functions logfactorial and choose. The latter utilizes the former to calculate 'n choose k' for any positive integer n and non-negative integer k. The choose function has a third argument log -- this is boolean (True/False) and specifies if the result of choose should be returned as log(choose) or not. Default is False (i.e. not).