Question: 2. a. Write two separate programs to solve the following problems: weight - Convert a weight in kilograms to its equivalent in pounds or
2. a. Write two separate programs to solve the following problems: weight - Convert a weight in kilograms to its equivalent in pounds or convert a weight in pounds to its equivalent in kilograms. Write a program to input a weight and then choose which of the two calculations to do and then calculate and print the answer. You can assume there is no error in input and the answer should be formatted to 3 decimal places. There are 2.205 pounds in a kilo. Sample output: Enter the original weight... 3.25 1. Convert kilos to pounds. 2. Convert pounds to kilos. Choose the conversion (1 or 2)...2 3.25 in pounds = 1.474 in kilos. When your program is complete, run it twice with the following test data (input) Original Weight (Conversion) Original Weight (Conversion) 20 (kilos to pounds 4.267 (pounds to kilos) Save the shell file that shows the output (or take a screenshot). Upload your weight.py code file and your output/screenshot file to Canvas by the start of the next class.
Step by Step Solution
3.34 Rating (157 Votes )
There are 3 Steps involved in it
Program 1 Convert W... View full answer
Get step-by-step solutions from verified subject matter experts
