Question: python homework help 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
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 main (+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
Get step-by-step solutions from verified subject matter experts
