Question: # Load the necessary module # Get user-defined number of successes k= int (input()) # Set the number of trials and the probability of success
\# Load the necessary module \# Get user-defined number of successes k= int (input()) \# Set the number of trials and the probability of success in each trial \# Calculate the probability of k successes given the defined n and p P=# Code to calculate probability print(f'\{P:-5E\}') \# Return the mean of the distribution mean = \#Code to find mean print(f'\{mean:.2f\}') \# Return the variance of the distribution var = \# Code to find variance
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
