Count committees with rules, by formula, and let the checker compare your answers with a full listing.
The idea. For a committee of from men and women, exactly women can be chosen in ways. At least one woman means all committees minus those with none.
Your tasks.
exactly, return the number of committees with exactly k women.at_least_one, return the number with at least one woman, by the complement.at_least, return the number with at least k women, by adding the cases k, k + 1, and so on up to r.words, return the number of words with v vowels and c consonants, chosen from nv vowels and nc consonants, all letters different.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…
With Standard, you also open 12 more problems, 2 Python labs and 1 extra course. Everything you have used here stays free, always.