Question: Question 4 (10 Points) Broken Pencil in Two Places Write a well-documented Python program, hmwk5Q4.py, to simulate breaking a unit-length pencil into two places. Repeat

 Question 4 (10 Points) Broken Pencil in Two Places Write a

Question 4 (10 Points) Broken Pencil in Two Places Write a well-documented Python program, hmwk5Q4.py, to simulate breaking a unit-length pencil into two places. Repeat the experiment 10,000 times and determine the average size of the smallest, middle-size, and the largest pieces. Record the estimate of the average sizes as a comment in your program. Hints: Import the random module and use the function random() twice to simulate breaking a pencil. Grading: Correct maino (+4 points). Correct if statement construction (one) (+4 points). Correct estimate for the average pencil sizes (+2 points)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!