Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Your city parks dept. needs to determine the largest circular running track they

ID: 3796757 • Letter: Y

Question

Your city parks dept. needs to determine the largest circular running track they can build within a square park area. The park is 200 feet on each side.

Write a Python program answers the following questions:

2-How many laps around the track - including partial laps - would runners need to complete in order to run a full mile (5,280 feet)? Round your answer to one decimal place.

3-How many full laps would runners need to complete if they want to run at least one full mile.

Extra credit:

- Update your program to prompt for a park side length, so planners can use it for a variety of parks sizes.

2 radius

Explanation / Answer

import decimal #for rounding off
import math #for ceiling function

side=input("Please enter park's side in feet: ")
side=int(side)
radius=float(side/2.0)
cir=2.0*3.14*radius
temp=decimal.Decimal(cir)
print("Longest track that can be built is of "+str(round(temp,1))+" feet")
laps=decimal.Decimal(5280.0/cir)
print("Number of laps for a mile will be "+str(round(laps,1)))
print("Number of full laps for a mile will be "+str(math.ceil(laps)))

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote