Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started