Question: Description: Create a program that converts the number of miles that you walked on a hike to the number of feet that you walked. Console:
Description: Create a program that converts the number of miles that you walked on a hike to the number of feet that you walked.
Console: Hike Calculator
How many miles did you walk?: 4.5 You walked 23760 feet. Continue? (y/n): y
How many miles did you walk?: 2.5 You walked 13200 feet. Continue? (y/n): n
Bye!
Specifications:
The program should accept a float value for the number of miles.
Store the code that gets user input and displays output in the main function.
There are 5280 feet in a mile.
Store the code that converts miles to feet in a separate function. This function should return an int value for the number of feet.
Assume that the user will enter a valid number of miles.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
