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
A rang check that could be use to validate... Date and time
lisov135 [29]

A range check is often used when a person works with data consisting of numbers, dates and times, or currency, ensuring that a number is within a specific range.

Explanation:

  • Range checks allow a person to set suitable boundaries.
  • An example of a range check is checking to see if the value of a 16-bit integer is within the capacity of a 16-bit integer. When a range check is performed, upper and lower boundaries are specified.
  • Range check is a validation check which can be applied to numeric fields. This is done to ensure that only numbers within a certain domain can be entered into a field. Remember that this does not necessarily mean that the data entered will be correct. But it will certainly lie within reasonable limits.
  • A method of validation which checks that data falls between an upper and lower acceptable value.
  • This validation check which can be applied to numeric fields. This is done to ensure that only numbers within a certain domain can be entered into a field. Remember that this does not necessarily mean that the data entered will be correct. But it will certainly lie within reasonable limits.
5 0
3 years ago
The first step when entering data is _
34kurt

Answer:

click on the cell

Explanation:

This is a little tricky. We need to first think of the column, then of row, and then click on the corresponding cell. And then we either start typing or move our mouse to highlight the cells. Hence, the correct option here is click on the cell.

3 0
2 years ago
Can a result that contains road maps for European countries have a highly meets rating
Mice21 [21]

Đápán3e

Explanation:

8 0
3 years ago
What was the strategy the company adopted for ERP implementation?
SashulF [63]

Answer:

Big Bang or Phased Approach – ERP Implementation strategies include Big Bang, Phased, Hybrid, and Parallel Adoption. Each organization requirements are different and as such, the project management method is itself evolving using PPM, SCRUM, and DevOps.

8 0
2 years ago
What is the diffrence between the the grassland and the savanna biomes
sergey [27]

Answer:

The term "savanna" is often used to refer to open grassland with some tree cover, while "grassland" refers to a grassy ecosystem with little or no tree cover.

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • According to the appendix what was the purpose of newspeak
    12·1 answer
  • When is the bond between the actin and myosin head is broken? when an ATP molecule binds to the myosin head when an ATP molecule
    6·1 answer
  • 2. What type of expansion card allows your computer to
    12·1 answer
  • To use the AutoCalculate area, select the range of cells containing the numbers for a calculation you want to verify and then pr
    7·1 answer
  • You open a folder Properties box to encrypt the folder, click Advanced, and discover that Encrypt contents to secure data is dim
    10·1 answer
  • The operating system provides a ____, which is the means with which you interact with the computer
    5·1 answer
  • Last week, a disk containing CSM Tech Publishing’s current project manuscripts crashed. Fortunately, there was a backup, but all
    15·1 answer
  • Which of the following is not the disadvantage of closed
    7·2 answers
  • What does it mean when your phone says not registered on network?.
    15·1 answer
  • What is one way a pivottable could combine the following data?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!