[Solved] Exercise 6 Write Python Program Converts Speed Miles Hour Kilometers Hour Mph Km H Kilomet Q37204930
by using python language
Exercise 6: Write a Python program that converts speed miles/hour to kilometers/hour (mph to km/h) and kilometers/hour to miles/hour (km/h to mph). The user wil indicate both a speed value and a choice of whether that speed is in miles/hour to be converted to kilometers/hour or kilometers/hour to be converted to miles/hour. Implement and use the following functions: kmph ToMph (..): receives the speed value in kilometers/hour and returns the corresponding speed mph ToKmph (): receives the speed value in miles/hour and returns the corresponding speed in main (..): A starting point function that controls the flow of your program. It calls mphToKmph in miles/hour kilometers/hour (…) and kmphToMph (… functions. You may use the following conversions (mph) is equal 1.609 (km/h) and I (km/h) is equal 0.621 (mph) Please input 1. Convert mph to km/h 2. Convert kmh to mph Please input 1. Convert mph to km/h 2. Convert km/h to mph Please input: 1. Convert mph to km/h 2. Convert km/h to mph Enter lor 2: 2 Enter lor 2:7 Invalid selection. Try again Enter lor 2:1 Please input the speed in miles/hour to be converted 15 15.00 mph = 24.14 kmh Please input the speed in kilometers/hour to be converted 45 45.00 km/h 27.96 mph Figure 6(a). Exercise 6 Sample Run 1 Figure 6(b). Exercise 6 Sample Figure 6(c). Exercise 6 Sample Run Run 2 Show transcribed image text Exercise 6: Write a Python program that converts speed miles/hour to kilometers/hour (mph to km/h) and kilometers/hour to miles/hour (km/h to mph). The user wil indicate both a speed value and a choice of whether that speed is in miles/hour to be converted to kilometers/hour or kilometers/hour to be converted to miles/hour. Implement and use the following functions: kmph ToMph (..): receives the speed value in kilometers/hour and returns the corresponding speed mph ToKmph (): receives the speed value in miles/hour and returns the corresponding speed in main (..): A starting point function that controls the flow of your program. It calls mphToKmph in miles/hour kilometers/hour (…) and kmphToMph (… functions. You may use the following conversions (mph) is equal 1.609 (km/h) and I (km/h) is equal 0.621 (mph) Please input 1. Convert mph to km/h 2. Convert kmh to mph Please input 1. Convert mph to km/h 2. Convert km/h to mph Please input: 1. Convert mph to km/h 2. Convert km/h to mph Enter lor 2: 2 Enter lor 2:7 Invalid selection. Try again Enter lor 2:1 Please input the speed in miles/hour to be converted 15 15.00 mph = 24.14 kmh Please input the speed in kilometers/hour to be converted 45 45.00 km/h 27.96 mph Figure 6(a). Exercise 6 Sample Run 1 Figure 6(b). Exercise 6 Sample Figure 6(c). Exercise 6 Sample Run Run 2
Expert Answer
Answer to Exercise 6: Write a Python program that converts speed miles/hour to kilometers/hour (mph to km/h) and kilometers/hour t… . . .
OR

