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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!