2. a. Write two separate programs to solve the following problems: weight - Convert a weight...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Related Book For
Spreadsheet Modeling & Decision Analysis A Practical Introduction to Management Science
ISBN: 978-0324656633
5th edition
Authors: Cliff T. Ragsdale
Posted Date:
Students also viewed these programming questions
-
Who can be found guilty of a business crime, and what does mens rea and actus reus mean? A.D. v. Best Western Int'l, Inc., 2023 U.S. Dist. LEXIS 65972,research an example of a business crime...
-
The purpose of this project is to work more with lists, looping, file I/O, functions, and dictionaries. For this assignment, you will work with real data from the web. Background Major solar storms...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
A money market portfolio has a market value of $20,000,000 and its value will change by $500 for a change in short-term yields of one basis point. The eurodollar futures contract has a tick size of...
-
On a warm summer day in early July 2011, Ms. Smith of the executive team of X Company sat in her office preparing a request form for routine travel expense reimbursement. She attached documentation...
-
Don Ball is a 55-year-old engineer. According to mortality tables, a male at age 55 has an average life expectancy of 21 more years. In prior years, Don has accumulated $48,500 including interest,...
-
Using information from the preceding question, suppose Copies R Us sold the machine for $5,000. What is the result of this disposal transaction? a. Gain of $2,000 b. Loss of $2,000 C. Gain of $3,000...
-
Iridium Technologies manufactures a variety of flash memory chips at its main foundry in Anam, Korea. Some chips are sold by Iridium to makers of electronic equipment while others are embedded into...
-
Question 11 (4 points) The BeMoreVisible is Ottawa's local social media video content developer. The company works 24 days a month on average. The production process of the videos is shown below. The...
-
Taiwan is a major world supplier of semiconductor chips. A recent earthquake severely damaged the production facilities of Taiwanese chip - producing companies, sharply reducing the amount of chips...
-
Solve. Check for extraneous roots. l o g 3 x 2 - 3 x 2 = l o g 3 2
-
A simple geometry of a slope is shown in Figure 2, with homogeneous deposit of soft clay on a stiffer clay at the bottom. Properties and thicknesses of the layers are as showed in the figure. a) Use...
-
1. Name two types of pathways that help a body maintain homeostasis, and an example of each. 2. What is the function of platelets? 3. Describe why air enters the lungs during inhalation. In your...
-
Now that you have assembled Sunset's raw data into useable income statements and balance sheets, and have evaluated the cash flow situation Sunset is faced with, Christina has asked you to assess any...
-
Journalize the following transactions using the direct write-off method of accounting for uncollectible receivables. April 1 Sold merchandise on account to Jim Dobbs, $6,600. The cost of goods sold...
-
(a) Consider an attractive spherical-well potential: V(x) = r < R and Vir) - 0, otherwise. Compute the a-wave phase shifts and -Vo for the scattering cross-sections for a particle of mass m in the...
-
RISE AIRLINES WE RISE TOGETHER! With the recent crisis in the country's airline industry failing to meet customer needs and demand, Rise Airlines is re-evaluating its overbooking policy for its most...
-
From a medical tourist perspective, compare Shouldice with the traditional hospital in terms of the key factors of competition. Using Table 15-3, why would Shouldice attract patients from outside the...
-
Refer to the previous question. Suppose the investments available to the Merrits have the following levels of risk associated with them. If the Merrits want the weighted average risk level of their...
-
A construction company wants to determine the optimal replacement policy for the earth mover it owns. The company has a policy of not keeping an earth mover for more than five years, and has...
-
Solve the following problem manually using the B&B algorithm. You can use the computer to solve the individual problems generated. Create a branch-and-bound tree to display the steps you complete....
-
List the reports available for reporting cash flows.
-
What additional steps are necessary to create a statement of cash flows for a period other than the one ending on the computers current system date?
-
Identify three different periods of time that QuickBooks Accountant provides for a statement of cash flows.
Study smarter with the SolutionInn App