1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Free_Kalibri [48]
4 years ago
12

The birthday problem is as follows: given a group of n people in a room, what is the probability that two or more of them have t

he same birthday? It is possible to determine the answer to this question via simulation. Using the starting template provided to you, complete the function called calc birthday probability that takes as input n and returns the probability that two or more of the n people will have the same birthday. To do this, the function should create a list of size n and generate n birthdays in the range 1 to 365 randomly, inclusive of the end-points 1 and 365. It should then check to see if any of the n birthdays are identical. The function should perform this experiment 106 times and calculate the fraction of time during which two or more people had the same birthday. The function will be called as follows from your main program:
IN PYTHON PLEASE

import random

def calc_birthday_probability (num_people):

random.seed (2020) # Don't change this value

num_trials = 1000

probability = 0
""" FIXME: Complete this function to return the probability of two or more people in the room having the same birthday. """

return probability
Computers and Technology
1 answer:
Vladimir [108]4 years ago
5 0

Answer:

He had a nearly 71% chance that 2 or more of us would share a birthday.

Explanation:

You might be interested in
Hi I paid for brainy plus, but it says the it can't renew and try paying for it again but it won't work. Please help
Scorpion4ik [409]

Answer:

Contact CS, ( customer support ) They should be able to help you. Go to this link for more info. brainly.com/contact/index

Explanation:

8 0
4 years ago
Data that can be used to identity a single individual is known as
lys-0071 [83]

Answer:

Fingerprint Recognition

Explanation:

3 0
3 years ago
Which type of cause and effect organizer would be best for alisha to understand how crude oil becomes gasoline?
sukhopar [10]
The answer is 100% B. Flow chart.
5 0
4 years ago
Read 2 more answers
What is the best way to study for an exam?
cupoosta [38]

AnswerB

Explanation:Makes since to look over the notes each night before the exam

8 0
3 years ago
You have a scenario where you need to disable the guest network on your wireless router. You try to log in, but your password do
Tom [10]

Answer:

Reset the router by holding down the reset button for 30 seconds. The reset button can be located in the back or bottom area of the router. The function of the reset button is to turn restore the wireless router to default factory setting such that customized settings including the DNS, the static IP address setup, stored personal passwords DHCP parameter settings port forwarding and routing settings are erased.

Explanation:

8 0
3 years ago
Other questions:
  • Write a program that reads in 10 numbers from the user and stores them in a 1D array of size 10. Then, write BubbleSort to sort
    13·1 answer
  • Suppose that you created an robot that was so advanced it could act independently in very complex situations. It made its own de
    9·1 answer
  • Given :an int variable k,an int array currentMembers that has been declared and initialized ,an int variable nMembers that conta
    12·1 answer
  • To save and store data separate from a computer, it helps to have an
    15·2 answers
  • When a business is using methods that help it use its time and resources the best they can, what are they exercising?
    11·2 answers
  • Write a program which asks the user to enter N numbers. The program will print out their average. Try your program with the foll
    11·1 answer
  • Secondary hard drive whats its purpose
    5·1 answer
  • Use the arr field and mystery () method below.
    9·1 answer
  • What do I do if my friend wants me to watch a video at my house?
    8·2 answers
  • Why do certain words change color in Python?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!