Question: Given user defined numbers k and n, if n cards are drawn from a deck, find the probability that k cards are black. Find the
- Given user defined numbers k and n, if n cards are drawn from a deck, find the probability that k cards are black.
- Find the probability that at least k cards are black.
Ex: When the input is:
11 7 the output is:
0.1628063397551007 0.24927823677714275 # Import the necessary module
n = int(input()) k = int(input()) # Define N and x
# Calculate the probability of k successes given the defined N, x, and n P = # Code to calculate probability print(P)
# Calculate the cumulative probability of k or more successes cp = # Code to calculate cumulative probability
print(cp)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
