Question 1 using if-elif, write a Python program that reports the contents of a compressed-gas cylinder...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Question 1 using if-elif, write a Python program that reports the contents of a compressed-gas cylinder based on the cylinder's color. The color name i.e. orange or brown etc.. can be entered as lower case or upper case letters but make sure the spelling is correct. Cylinder colors and associated contents are as follows: • orange ammonia • brown carbon monoxide • yellow hydrogen green oxygen If the color is not one of the four names mentioned above, your program displays "Contents unknown". Sample run 1: Enter th cylinder color: yellow The contents is hydrogen Sample run 2: Enter th cylinder color: GREEN The contents is oxygen Sample run 3: Enter th cylinder color: Bron Contents unknown Sample run 4: Enter th cylinder color: ORange The contents is amonia Sample run 5: Enter th cylinder color. Brown The contents is carbon monoxide → → 0 0 G m Question 1 using if-elif, write a Python program that reports the contents of a compressed-gas cylinder based on the cylinder's color. The color name i.e. orange or brown etc.. can be entered as lower case or upper case letters but make sure the spelling is correct. Cylinder colors and associated contents are as follows: • orange ammonia • brown carbon monoxide • yellow hydrogen green oxygen If the color is not one of the four names mentioned above, your program displays "Contents unknown". Sample run 1: Enter th cylinder color: yellow The contents is hydrogen Sample run 2: Enter th cylinder color: GREEN The contents is oxygen Sample run 3: Enter th cylinder color: Bron Contents unknown Sample run 4: Enter th cylinder color: ORange The contents is amonia Sample run 5: Enter th cylinder color. Brown The contents is carbon monoxide → → 0 0 G m
Expert Answer:
Answer rating: 100% (QA)
The description in the image is for an exercise requiring to write a Python program that determines ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
The lob in tennis is an effective tactic when your opponent is near the net. It consists of lofting the ball over his head, forcing him to move quickly away from the net (see the drawing). Suppose...
-
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...
-
Should common costs be allocated?
-
Using the data in BE4-4, calculate equivalent units of production for materials and conversion costs, assuming materials are entered at the beginning of the process. In BE4-4, Ending Work in Process...
-
Four years after issue, debentures with a face value of $1,000,000 and book value of $960,000 are tendered for conversion into 80,000 shares of common stock immediately after an interest payment...
-
Calculate \(\Delta G^{0}\) for the hydrogenation of ethylene at \(298 \mathrm{~K}\) using the following data: \(\Delta G_{f, 298}^{0}\) for \(\mathrm{C}_{2} \mathrm{H}_{4}=68.12 \mathrm{~kJ} /...
-
On January 1, 2019, Quenneville Corporation sold equipment to Wirtz, Inc., for $500,000. The equipment had cost $300,000 to manufacture. The contract with Wirtz requires Quenneville to provide...
-
After referring to "The Leader's Role In Shaping And Reinforcing Culture"; List and describe the ways leaders shape and reinforce organizational culture?
-
Ramona and Hermione formed Wiley Corporation on January 2. Ramona contributed cash of $295,000 in return for 50 percent of the corporation's stock. Hermione contributed a building and land with the...
-
If the polynomial x 4 + 2x 3 + 8x 2 + 12x + 18 is divided by another polynomial x 2 + 5, the remainder comes out to be px + q. Find the values of p and q.
-
A 900.0 kg roller coaster car starts from rest at point A, rolls down the track, goes around a loop (points B and C) and then flies off the inclined part of the track (point D). The dimensions are: H...
-
Derive Newton's second law using the Lagrangian formulation of classical mechanics Part B) Derive Newton's second law using the Hamiltonian formulation of classical mechanics
-
2. The acceleration due to gravity near the surface of Mars is 3.69 m/s. One morining, an astronaut tests her jetpack. Starting from rest, the jetpack accelerates her upward from the ground with a...
-
Suppose a chemist discovers a new metallic element and names it "Xtrinsium" (Xt). Xt exhibits chemical behaviour similar to an alkaline earth. Xt(s) + Cl(g) XtCl(s) - Lattice energy for XtCl First...
-
According to Dalton's atomic theory a b no two atoms of given element are exactly alike. only compounds are made of atoms. d atoms cannot be subdivided, created, or destroyed. atom is composed of...
-
Use the graph of y = f(x) shown to the right to graph the following function g. 9(x)-> -3 Choose the correct graph below. OA OB. C. C D.
-
With your classmates, form small teams of skunkworks. Your task is to identify an innovation that you think would benefit your school, college, or university, and to outline an action plan for...
-
This is a design tool that describes the input, processing, and output of a function. a. Hierarchy chart b. IPO chart c. Datagram chart d. Data processing chart
-
What part of the computer actually runs programs?
-
What will occur when the following code is executed? months = {'Jan':1, 'Feb':2, 'Mar':3} months[2]
-
_____________ is also used as requirement finding and feasibility testing tool. (a) Prototype (b) Reports (c) System (d) Procedure
-
A prototype can be ___________. (a) Complete system with partial requirements (b) Working model (c) Full-fledged system (d) All of these
-
Which of the following systems development approach is adopted if information requirements are not well defined? (a) SDLC (b) Prototype (c) Structured approach (d) Agile
Study smarter with the SolutionInn App