Question: Program a calculator function that allows you to calculate the four basic counting techniques. Your calculator function should accept four inputs: the number of objects
Program a calculator function that allows you to calculate the four basic counting techniques.
Your calculator function should accept four inputs: the number of objects from which to choose (typically denoted n), the number of objects being chosen (typically denoted k), whether sampling is to be done with replacement, and whether the order of the sampling matters.
You may not use package functions that do the calculations directly, but you may use such things as a prebuilt factorial function.
Once you have built your calculator, run four test cases (one for each of the four counting techniques) and comment on whether the result is correct. (You need not make up a story. Just supply the numbers.)
Step by Step Solution
There are 3 Steps involved in it
To build a calculator function for the four basic counting techniques permutations combinations permutations with replacement and combinations with re... View full answer
Get step-by-step solutions from verified subject matter experts
