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]
3 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]3 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
someone please do this for and send a screeshot or picture please its really important for my examsss :D​
dusya [7]

Answer:

I  dont know

Explanation:

i dont know

4 0
2 years ago
What must be done before using ArrayLists?<br><br> (This is Java Programming btw)
Viktor [21]

Answer:

to create an ArrayList , you declare an Arraylist variable and call the ArrayList constructor to instantiate and ArrayList object and assign it to the variable

5 0
3 years ago
USB flash drives are small portable units that are used to ____________files.
Juliette [100K]

Answer:D

Explanation: they do all of these

3 0
3 years ago
Read 2 more answers
Write a dialogue between two friends who are debating on popularity or property​
Anastasy [175]

Answer:

example:

James said, " popularity isn't the important. "

David said, " It is ."

3 0
3 years ago
What is the name for programs used on mobile computing devices that allow users do a variety of things?
umka2103 [35]
That would be applications
6 0
3 years ago
Other questions:
  • If i find an image and copy and paste it into Paint.
    5·1 answer
  • Copy the 10 statements as they appear below into your journal.
    6·2 answers
  • What is the correct order of headers, from left to right, in a completed frame?
    8·1 answer
  • When you are working in Performance Monitor, in the "Add Counters" dialog box, and need more information about a particular coun
    8·1 answer
  • What framework provides a simple API for performing web tasks?
    13·1 answer
  • 1.The hardware that allows data to be transmitted from a computer along a telephone line to another computer at the other end is
    12·1 answer
  • What is the TSA motto
    7·1 answer
  • What is good work ethic?​
    11·1 answer
  • What is software engineering? What are the objectives of software engineering?
    5·1 answer
  • 9- Write a program in MARIE to add three numbers.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!