Question: 1. Programming Exercise #1 (Kilometer Converter): The program should consist of a main function, which asks the user to enter the distance in kilometers. Write

1. Programming Exercise #1 (Kilometer Converter): The program should consist of a main function, which asks the user to enter the distance in kilometers. Write a simple function to accept the distance and compute the number of miles. Output the number of kilometers and the number of miles.

a. Name your Python file Your initials + Kilometers.py

b. The user should be able to enter the number of kilometers as an integer.

c. A statement in the main function should call the compute_miles function with the one argument for the distance.

d. The function should output the distance in kilometers and the distance in miles. Be sure to add wordage to let the user know which numbers are which

e. In the main function, after calling the compute_miles function, display a blank line, followed by a message with these lines in it: Kilometers XXXXX is equal to XXXXX miles

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!