Question: This video will help you understand the requirements. Write a program that calls a function named km2miles(). 1. Declare a global variable named miles -
This video will help you understand the requirements. Write a program that calls a function named km2miles(). 1. Declare a global variable named miles - that is in the video 2. Call your function from your main code 3. Ask the user to enter some number of kilometers. 4. The function converts the number of kilometers to miles using the formula: Miles - kilometers 0.6214 5. The function then returns the kilometers back to the main() function 6. The main() function prints out a statement that says: It is calculated that NUMBER OF KILOMETERS kilometers is the same as CALCULATED NUMBER_OF_MILES mile Where: NUMBER OF KILOMETERS is the value input by the user CALCULATED NUMBER OF MILES is the value calculated in the function and returned. Submit your .py file If the input is 10 kilometers the output would be It is calculated that 10.0 kilometers is the same as 6.2139999999999995 miles
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
