Question: Start with this Python file Download this Python file. In the # Function Definition section, define two functions: The first function should prompt the user

Start with this Python file Download this Python file.
In the # Function Definition section, define two functions:
The first function should prompt the user to enter a measurement in centimeters, convert that measurement from centimeters to inches, and output the result in inches.
The second function should prompt the user to enter a measurement in inches, convert that measurement from inches to centimeters, and output the result in centimeters.
Make sure that your functions are called correctly when the program executes.
Your program must follow the Python style guide provided in class.
Your program must only utilize the methods and structures we have covered in class. # Functions Definition
# Program Commands
menuChoice ="y"
while menuChoice !="Q": # begins menu loop
print("
Enter 1 to convert centimeters to inches.")
print("Enter 2 to convert inches to centimeters.")
print("Enter Q to quit.")
menuChoice = input("What do you want to do?")
if menuChoice =="1":
cm_to_in() # run cm to in conversion
elif menuChoice =="2":
in_to_cm() # run in to cm conversion
elif menuChoice =="Q":
print("Thanks for playing. Have a great day!") # Quit
else:
print("Invalid Input") # User input an invalid choice

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 Programming Questions!