subject
Engineering, 18.03.2020 02:58 jorgelive5870

The eventual goal of this assignment is to compute the total number of ways of forming a collection of committees from an academic department of n professors The first task is to write a function called committee to compute the number of ways of forming a single committee with r members from a collection of n people. This is the same as computing the number of ways of choosing r people out of n to sit at the first of two tables, and is therefore n! (r!*(n-r)!) by the reasoning given in the zyLab in section 6.18 on seating a large group at multiple tables. Make sure the function returns an integer, not a floating point number with a decimal point In addition to the fact that this must now be a function, there there are now some further enhancements First of all, there committee membership, so there are r n! need a chairperson If so, there are r choices for the a chaired committee. Another way of ways of of the possible the for selecting is the potential that the chairperson each forming such committee of might (r! (n-r)!) ways thinking how to form such a committee is to choose the chairperson first (there are n possible choices for that), and then for each possible chairperson n-r, this gives the same final formula n! (r-1)! (n-r)!) Your function definition must be of a form like def committee (people, members, chairperson where the parameter "people" is an integer giving the number of people to choose from (called "n" in the formulas above), the parameter "members" is an integer giving the number of members in the committee (called "r in the formulas above) and the parameter "chairperson" is a boolean variable which is True if a chairperson is required, and the formula in the third paragraph of this specification must be used, and False if the committee has no chairperson, and the formula in the second paragraph must be used. You must use exactly these names for the parameters, because your function will be be called by keyword arguments using these parameter names in some of the tests, instead of just relying on the parameter order. Write your function in a file named committee. py, and upload it to zyBooks for the first few tests, which will exercise as it as a module using programs already at zyBooks that import your committee function from it. The first test is with the following calls from committee import committee committee (10, 3, True committee (10, 3, alse committee (members 3, people 10, chairperson True) committee (chairperson False embers 3, people 10) committee (2, 2, True committee (3, 3, False and the six values returned should be 360, 120, 360, 120, 2, 1 respectively. Ifthey are not all correct, zyBooks will report True for the correct ones, and False for the incorrect ones. For now, you may submit an empty file for the file multiple committees. py which will be required for later steps

ansver
Answers: 2

Another question on Engineering

question
Engineering, 04.07.2019 16:10
The force on a cutting tool are 2600n vertically downward and 2100 horizontal. determine the resultant force acting on the tool and the angle at which it acts.
Answers: 1
question
Engineering, 04.07.2019 18:10
Refrigerant 134a enters an insulated compressor operating at steady state as saturated vapor at -26°c with a volumetric flow rate of 0.18 m3/s. refrigerant exits at 9 bar, 70°c. changes in kinetic and potential energy from inlet to exit can be ignored. determine the volumetric flow rate at the exit, in m3/s, and the compressor power, in kw.
Answers: 1
question
Engineering, 04.07.2019 19:10
Afoot bridge is made as a simple deck, 4 m long, with a cross section 2 m (wide) and 20 cm thick, and made of wood. the deck is supported at the two ends. the maximum load allowable on the bridge is 10 tons, provided it is uniformly distributed on the deck. to sense this load, a strain gauge is placed at the center of the bridge and its resistance is monitored. if the sensor has a nominal resistance of 350 s2 and a gauge factor of 3.6, what is the reading of the strain gauge at maximum load? the modulus of elasticity for the wood used in the construction is 10 gpa.
Answers: 2
question
Engineering, 04.07.2019 19:10
What is the major difference between thermoplastics and thermosetting plastics from the polymerization structure point of view?
Answers: 2
You know the right answer?
The eventual goal of this assignment is to compute the total number of ways of forming a collection...
Questions
question
History, 17.12.2019 14:31
question
Biology, 17.12.2019 14:31
Questions on the website: 13722362