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...
-
The following information is available for PepsiCo, Inc. (in U.S. millions): In the notes to its financial statements, PepsiCo disclosed that it uses the FIFO and average cost formulas to determine...
-
Which date is used to record a credit card transaction?
-
What is a bearer bond?
-
Hockey pucks used by the National Hockey League (NHL) and other professional leagues weigh an average of 163 grams (5.75 ounces). A quality inspector monitors the manufacturing process for hockey...
-
d'Anconia Copper is an all - equity firm with 6 0 million shares outstanding, which are currently trading at $ 2 0 per share. Last month, d'Anconia announced that it will change its capital structure...
-
The adjusted trial balance at April 30, 2020, for Zhang Co. follows. Debit 101 Cash $ 3,900 106 Accounts receivable 8,800 153 Trucks 27,500 154 Accumulated depreciation, trucks 193 Franchise 13,500...
-
Use the following tax rates, ceiling, and maximum taxes: Employee and Employer OASDI: 6.20% $160,200 $9,932.40 Employee* and Employer HI: 1.45% No limit No maximum Self-employed OASDI: 12.4% $160,200...
-
What is a root locus plot?
-
Fill in the Blanks. The logarithmic decrement denotes the rate at which the __________ of a free damped vibration decreases.
-
Define the time constant.
-
What is the order of the equation of motion given by \(m \dot{v}+c v=0\) ?
-
Fill in the Blanks. In the \(s\)-plane, lines parallel to real axis denote systems having different __________ frequencies.
-
Ivanhoe Inc.'s books revealed the following data at year end after all adjustments were made: Cash sales $766000 Sales returns (on credit sales) 31000 Allowance for expected credit losses (credit...
-
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....
-
An increase in which component of quality costs is most likely to result in a decrease in the other three components? a. prevention costs b. inspection costs c. internal failure costs d. external...
-
Activity-based costing can be used to refine which of the following? a. job-order costing b. process costing c. both job-order and process costing d. neither job-order nor process costing
-
How might the proportion of total quality control costs in each of the four components of quality control (prevention, inspection, internal failure, and external failure) vary for different types of...
Study smarter with the SolutionInn App