(python) Write the program based on the details in the picture and the additional details below. Since this is a simulation, we will not prompt the user for inputs. Any inputs will result in a loss of points. To determine the radius of the circle, add together your Birth Month and Day.  So my radius would be 41. NOTE: this radius will be used for all of the simulation trials. Once you have the radius, implement the Monte Carlo simulation with 500,000 random (x,y) points (remember to make them floats) and display the results of 10 trials. Each trial does another simulation of 500,000 random (x,y).  Display the following for each trial: Trial number Number of hits inside the circle from the simulation The percentage of hits (Only want 2 decimal places) At the end you must display the average percentage for all 10 trials. Bonus Option: Create an 11th trial and create a graphic representation of the simulation. Draw a square and corresponding circle (you do not need the grid) Draw each (x,y) point on the square/circle I would recommend scaling the square, circle and (x,y) points accordingly for better visuals.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

(python)

Write the program based on the details in the picture and the additional details below.

Since this is a simulation, we will not prompt the user for inputs. Any inputs will result in a loss of points. To determine the radius of the circle, add together your Birth Month and Day.  So my radius would be 41.

NOTE: this radius will be used for all of the simulation trials.

Once you have the radius, implement the Monte Carlo simulation with 500,000 random (x,y) points (remember to make them floats) and display the results of 10 trials. Each trial does another simulation of 500,000 random (x,y).

 Display the following for each trial:

  • Trial number
  • Number of hits inside the circle from the simulation
  • The percentage of hits (Only want 2 decimal places)

At the end you must display the average percentage for all 10 trials.

Bonus Option:

Create an 11th trial and create a graphic representation of the simulation.

  • Draw a square and corresponding circle (you do not need the grid)
  • Draw each (x,y) point on the square/circle

I would recommend scaling the square, circle and (x,y) points accordingly for better visuals.

Here is a sample simulation:
An example assuming radius is 1. Probability of a point falling in the circle is circle Area /
square Area, which is ar / (2r * 2r). In this case, it is a | 4. The estimated number of hits
becomes a/ 4 = 785398.16 or 78.54 %
Here is a sample output:
The probability of a point falling in the circle is 78.54 %
Radius of the circle is 1
Trial Run 1:
Simulation resulted in 382123 hits inside the circle.
Percentage of hits: 76.42%
Trial Run 2:
...
Transcribed Image Text:Here is a sample simulation: An example assuming radius is 1. Probability of a point falling in the circle is circle Area / square Area, which is ar / (2r * 2r). In this case, it is a | 4. The estimated number of hits becomes a/ 4 = 785398.16 or 78.54 % Here is a sample output: The probability of a point falling in the circle is 78.54 % Radius of the circle is 1 Trial Run 1: Simulation resulted in 382123 hits inside the circle. Percentage of hits: 76.42% Trial Run 2: ...
The Monte Carlo simulation uses random numbers and probability to solve problems. This
method has a wide range of applications in computational mathematics, physics, chemistry, and
finance.
For this project, you are going to generate a circle with a calculated size (the radius), inside of a
square, and generate 500,000 random (x,y) points. Each (x,y) point should be a float, not
integers.
Outputs. The exact format and wording is up to you, but must have this data:
Summary of simulations
Computed probability of a (x,y) location inside the circle (Only want 2 decimal
places)
Radius of the circle
For each simulation, you will output the following:
Trial number
Number of hits inside the circle from the simulation
The percentage of hits (Only want 2 decimal places)
Transcribed Image Text:The Monte Carlo simulation uses random numbers and probability to solve problems. This method has a wide range of applications in computational mathematics, physics, chemistry, and finance. For this project, you are going to generate a circle with a calculated size (the radius), inside of a square, and generate 500,000 random (x,y) points. Each (x,y) point should be a float, not integers. Outputs. The exact format and wording is up to you, but must have this data: Summary of simulations Computed probability of a (x,y) location inside the circle (Only want 2 decimal places) Radius of the circle For each simulation, you will output the following: Trial number Number of hits inside the circle from the simulation The percentage of hits (Only want 2 decimal places)
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY