Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Performance Engineering 10th European Workshop Epew 2013 Venice Italy September 17 2013 Proceedings

Authors: Maria Simonetta Balsamo ,William Knottenbelt ,Andrea Marin

2013 Edition

3642407242, 978-3642407246

More Books

Students also viewed these Programming questions

Question

the principles of destination marketing?

Answered: 1 week ago

Question

What is the adjusted present value of this project? LO.1

Answered: 1 week ago