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
When in global configuration mode, which steps are necessary to edit an ip address on an Ethernet interface?
katrin2010 [14]

Answer:

I. You should enter interface configuration mode.

II. Configure the IP address and subnet mask.

Explanation:

A node refers to the physical device that make up a network and are capable of sending, receiving, creating and storing data in communication.

Some examples of network nodes are modem, hubs, computer, switches, phone and printers.

In Computer networking, network devices such as routers and switches are usually configured (programmed) through the use of specific network commands commonly referred to as configs e.g show int description, config terminal (config t), show IP address, etc.

In Cisco devices, there are five (5) main types of command modes;

1. Sub-interface configuration mode.

2. Interface configuration mode.

3. Line configuration mode.

4. Router configuration method.

5. Global configuration mode.

Global configuration mode is a configuration mode that avail network engineers and end users with the ability to modify or edit the running (global) system configuration of a networking device. Thus, any change effected at the global configuration mode will affect the network device as a whole.

In global configuration mode, the steps which are necessary to edit an ip address on an Ethernet interface include;

I. You should enter interface configuration mode using the "configure terminal" command.

II. Configure the IP address and subnet mask.

See an example below;

"Router(config-if)# IP address 192.168.1.2 255.255.255.0"

4 0
3 years ago
Why it is important for everyday people to have access to credible online information?
Citrus2011 [14]

Answer:

so you know what is true

Explanation:

5 0
4 years ago
Read 2 more answers
Adam has to write a paper where the margins need to be set to these measurements: Left: 1.5" Right: 4" Bottom: 1" Top: 1"
Sholpan [36]

In Microsoft Word, he should go to Page Layout and then to Margins.

8 0
4 years ago
How does a layered pattern make use of abstraction and encapsulation?
maxonik [38]

Answer and Explanation:

The ways in which a layered pattern make use of encapsulation and abstraction are as follows:

  • This framework lays its focus mainly on the bundling of related functionalities inside an application into different layer that are vertically stacked over one another.
  • Functionality in between each layer is related by common function or role.
  • Communication in between the layers is clear and exact and is coupled loosely.
  • Providing a layered structure to the application indirectly supports its maintainability and flexibility.

Encapsulation:

Since, features like data type, properties, methods or implementation while designing are not exposed at the boundary of the layer thus No assumptions are required for these features.

Abstraction:

The layered framework abstracts the entire system's view and provides adequate details for better understanding of the roles of each layer individually and the relation that exist between these layers.

7 0
4 years ago
In unix, the ________ permission allows the user to make changes.
mote1985 [20]
The write permission, specifically: -r--r--r-- changed to -rw-r--r--
6 0
4 years ago
Other questions:
  • Write a program to help you feed your friends at a party by doing some math about square pizzas. Assume the grader defines a str
    12·1 answer
  • Andy, a developer, is designing a new program. Which tool should Andy use to help him complete his task?
    6·1 answer
  • This type of connection uses radio waves to connect devices on a network.
    9·2 answers
  • How are overhead projectors being used to improve teaching and learning in the classroom?
    12·2 answers
  • Tara and Zach are leading a systems development project and they want the investigation phase to go smoothly and quickly. They d
    5·1 answer
  • The destination ip address is 164.109.27.233 subnet mask of 255.255.192.0 network address is
    12·1 answer
  • An IT suspects that an unauthorized device is connected to a wireless network. This is a result of pastry sharing on a device br
    13·1 answer
  • Describe how operating system use the following security tools: firewall, automatic updating, antivirus software, spyware and ma
    11·1 answer
  • I live in Pennsylvania which observes eastern standard time.
    13·1 answer
  • You've just deployed a new Cisco router that connects several network segments in your organization. The router is physically lo
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!