Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Background: Randy Olson designed a route around the United States that passes through 50 major national landmarks, parks, and monuments. This route crosses all 48
Background: Randy Olson designed a route around the United States that passes through 50 major national landmarks, parks, and monuments. This route crosses all 48 contiguous states and requires a minimum of 13,700 miles. Assume that one of your friends fantasizes of entering into Guinness World Records book for taking that trip on foot. Your job is to help your friend (or anyone else) to compute the expected duration for this venture. 1. Create a Python Program to read the expected total distance (e.g., 13,700 miles) and report the estimated number of years, months, days, and hours. Assumptions: Since the intent is to compute an estimate, you may assume that all numbers are integers and: 1 year = 12 months, 1 month = 30 days; 1 day = 24 hours 2. In this assignment, the statement main() should call the function main(). Then the function main() should call other functions to do the tasks shown in the Hierarchy Chart below. main welcome_n_purpose().get_input( compute_duration display_output get ttl distance get_days_pm get_hrs_pdget_miles_ph 3. The function get_input() should call four other functions, each of which asks for a different input, reads it, and reports it back to "get_input(). When "get_input( receives all four input values, it reports them to main(). At that point main passes these four values to "compute_duration() that calculates the years, months, days, and hours. "compute_duration() reports back to main() the results of the computation. Finally, main() passes all values (input and output) to "display_output( ) in order to echo the input data and display the output. O 4. Sample input: Total distance:13,700 miles Number of expected walking days per month: 25 Number of expected walking hours per day: 6 The expected average walking miles per hour: 4
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started