Question: need to solve this with a python program thx Programming questions: 16. [20 points] Write a program to convert between pound (P) and kilogram (K)
need to solve this with a python program thx
![Programming questions: 16. [20 points] Write a program to convert between pound](https://s3.amazonaws.com/si.experts.images/answers/2024/05/664c8ef214ba3_361664c8ef1aecc2.jpg)
Programming questions: 16. [20 points] Write a program to convert between pound (P) and kilogram (K) weights. The conversion formula is pounds = 2.2*kg. Requirements: - The program must first ask the user to choose the source units pounds (enter P) or kilograms (enter K) If the source unit is not P or K, the program will display a message 'Incorrect weight type!' and terminate. If the input unit is valid, the program will prompt the user to enter the weight value The program will output the converted weight with only one decimal place. Your program needs to match the following test cases; make sure your program produces the prompts/messages to the user in the same format as shown below (only displaying result value without matching the messages and formatting as below will result in reduced points): Test Case 1: Please enter K for kilograms or P for pounds: K Please enter the weight: 73.5 The converted weight is: 161.7 pounds. Test Case 2: Please enter K for kilograms or P for pounds: P Please enter the weight: 147.8 The converted weight is: 67.2 kilograms. Test Case 3: Please enter K for kilograms or P for pounds: A Incorrect weight type!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
