The Input(cm) column does not need two decimal places and the the first value (row of zeros)
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The success of ServerBox Co. has led to the hiring of thousands of workers from various countries, each using a different measurement system. To aid the company, a conversion script is necessary. The script should ask the user for four values in centimeters and convert them to their equivalent in yards, feet, and inches. Make sure you use a for loop to avoid repetition of code. Validate the input and do not accept any value less than zero. The output should be formatted in four columns, with two decimal places for each value, as shown in the example. Input (cm) 0 50 100 312 Yards 0 0.55 1.09 3.41 Feet 0 1.64 3.28 10.24 Inches 0 19.69 39.37 122.83 (Needed conversions: 1 centimeter = 0.393700787 inches; 1 foot = 12 inches; 1 yard = 3 feet) The success of ServerBox Co. has led to the hiring of thousands of workers from various countries, each using a different measurement system. To aid the company, a conversion script is necessary. The script should ask the user for four values in centimeters and convert them to their equivalent in yards, feet, and inches. Make sure you use a for loop to avoid repetition of code. Validate the input and do not accept any value less than zero. The output should be formatted in four columns, with two decimal places for each value, as shown in the example. Input (cm) 0 50 100 312 Yards 0 0.55 1.09 3.41 Feet 0 1.64 3.28 10.24 Inches 0 19.69 39.37 122.83 (Needed conversions: 1 centimeter = 0.393700787 inches; 1 foot = 12 inches; 1 yard = 3 feet)
Expert Answer:
Answer rating: 100% (QA)
Here is the code in Python PYTHON def centimeterstoyardsfeetinchescentimeters Converts centimeters t... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
QUESTION 17 The moment of a force about a pivot point is; a. The force multiplied by the perpendicular distance fro the pivot point to the direction of the force b. the distance from the pivot to the...
-
An electron is trapped in a one-dimensional infinite potential well. For what (a) Higher quantum number and (b) Lower quantum number is the corresponding energy difference equal to the energy of the...
-
Let Q be 3 x 3 orthogonal matrix whose determinant is equal to 1. (a) If the eigenvalues of Q are all real and if they an' ordered so that 1 2 3. deternine values of all possible triples of...
-
Draw an energy diagram for just the basket in Figure 9.10. Figure 9.10 Different choices of system yield different energy diagrams. (a) System basket + Earth (b) System person + rope + basket + Earth...
-
Corvallis Corporation owns 80% of the stock of Little Harrisburg, Inc. At December 31, 2010, Little Harrisburg had the following summarized balance sheet: The earnings of Little Harrisburg, Inc., for...
-
In the video below, critique the introduction and conclusion that was delivered in a speech on "Cyber Security." What are the speaker's weaknesses?
-
WestGas Conveyance, Inc. WestGas Conveyance, Inc., is a large U.S. natural gas pipeline company that wants to raise $120 million to finance expansion. WestGas wants a capital structure that is 50%...
-
Calculate what should be the sale quantity to reach break even point. ( Round to nearest whole number ) Selling Price = $38 per unit Variable cost = $12 per unit Fixed cost = $480,000
-
True Or False Even if a defendant intentionally interfered with the plaintiffs use of their land, some courts require that the plaintiff prove that the harm they suffered was greater than the utility...
-
What is the justification for strict liability in product liability cases? Why are some courts critical of strict liability?
-
To recover for the tort of ____________ ____________, the plaintiff must prove that the defendant instituted criminal proceedings without probable cause and for purposes other than bringing the...
-
What are the elements of public nuisance? a. Why must the plaintiff prove that they suffered damages peculiar to them? b. In what way have the courts struggled with the concept of particular damage?
-
True Or False Under the six factor Restatement test, one factor alone can be sufficient for strict liability.
-
A graphing calculator is recommended. For a camera with a lens of fixed focal length F to focus on an object located a distance x from the lens, the film must be placed a distance y behind the lens,...
-
The vapor pressure of the liquid NH, is measured at different temperatures. The following vapor pressure data are obtained. Temperature, K P, mmHg 217.1 223.4 234.7 588.1 Calculate the enthalpy of...
-
Mike purchases a heavy-duty truck (5-year class recovery property) for his delivery service on April 30, 2012. The truck is not considered a passenger automobile for purposes of the listed property...
-
Jim is fired from his job as a waiter and decides to take an extended trip to Europe. After touring Europe for 3 months, Jim returns to look for a new job as a waiter. Are his job-hunting expenses...
-
Larry Gaines, age 42, sells his personal residence on November 12, 2012, for $144,000. He lived in the house for 7 years. The expenses of the sale are $10,500, and he has made capital improvements of...
-
(a) The longitudinal data set "v4c" is in the vertical format; transform it into the horizontal format. (b) Transform the data set you obtained in part (a) back into the vertical format.
-
Plot the mean/SD of HIV knowledge of adolescent girls at baseline and three months post treatment stratified by treatment for the Sexual Health study.
-
Prove (9.31) . = BE (GS;S; G) BT, B = (B), B-T (9.31)
Study smarter with the SolutionInn App