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
Which principle suggests that specific single responsibility interfaces are better than one general purpose interface?
ElenaW [278]

Answer:Interface segregation principle

Explanation: Interface-segregation principle (ISP) is amongst the major principles of the object-oriented design which describes that none of the users/clients can be forced for indulging and depending on the unknown methods or methods that they don't have knowledge about.

It functions by making the interfaces visible to the user that specifically fascinates them and keeping other smaller interfaces.Interfaces are made by splitting process and making the small interfaces from them.

8 0
2 years ago
What is impact of Internet<br> in our lives
NeTakaya

Answer:

The Internet has changed business, education, government, healthcare, and even the ways in which we interact with our loved ones—it has become one of the key drivers of social evolution. The changes in social communication are of particular significance.

7 0
3 years ago
The user cannot use a computer system without.................... software<br><br>​
zheka24 [161]

Answer:

the user cannot use a computer system without hardware and software

4 0
3 years ago
Read 2 more answers
PLEASE HELP!!!!!! ASAP
NNADVOKAT [17]

Answer:

use a wizard or use a design view

Explanation:

i took the test

4 0
3 years ago
Read 2 more answers
What is the main advantage that a website builder offers for web development?
Trava [24]
The correct answer is: OA. It enables people with no coding skills to create websites.
4 0
3 years ago
Read 2 more answers
Other questions:
  • Fill in the blank - A generation of social-oriented, physical games such as the _______ Wii console, emerged in the late 2000s,
    15·1 answer
  • A type of cpu socket, used with modern intel processors, where the cpu itself has no pins but the contact pads of the cpu line u
    8·2 answers
  • Why it’s important to keep the standard internet protocol TCP/IP?
    11·1 answer
  • i will be doing an interview to someone so plz comment down below something random and you will automatically enter
    11·1 answer
  • A. True
    8·1 answer
  • A building is equipped with light sensors that turn off the fluorescent lights when natural light is above a certain brightness.
    5·1 answer
  • What is the largest possible value that the variable x can have after the code segment executes? 17 17 A 14 14 B 11 11 C 4
    8·1 answer
  • The Texas Department of Education has offices throughout the state covering more than 268,000 square miles. State documents are
    11·1 answer
  • Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar.
    14·1 answer
  • What was one effect of better printing methods during the Ming Dynasty? Updated trade routes A new merchant class Increased lite
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!