subject
Computers and Technology, 01.02.2021 22:10 SMNS625

Extend by prompting the user for a color they want to paint the walls. Calculate and output the total cost of the paint cans depending on which color is chosen. Hint: Use a dictionary to associate each paint color with its respective cost. Red paint costs $35 per gallon can, blue paint costs $25 per gallon can, and green paint costs $23 per gallon can. Hint: to account for the paint color, you can either use an "if... elif . else sequence to test for equality of the input color string with each of the three allowed strings red', blue, or green, or else use a dictionary like the one below to associate each paint color with its respective cost. (Submit for 3 points, including one hidden test case, so 8 points total) paintcolors = {
red': 35,
blue': 25,
green': 23
}

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 11:00, la200564
How should you specify box sizes on a web page if you want the boxes to vary according to the font size of the text they contain? a. in pixels b. in inches c. as percentages d. in em units
Answers: 2
image
Computers and Technology, 23.06.2019 21:40, minnie7760
Draw the resistor’s voltage and current phasors at t=15ms. draw the vectors with their tails at the origin. the orientation of your vectors will be graded. the exact length of your vectors will not be graded.
Answers: 2
image
Computers and Technology, 24.06.2019 02:40, homework1911
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
image
Computers and Technology, 24.06.2019 15:30, jhony70
What type of forensic evidence was recovered during the bomb set off at the new mexico facility on the video that was similar to the evidence obtained at the boston bombings and how did the evidence allow the researchers to connect other pieces of evidence to the same bomb?
Answers: 2
You know the right answer?
Extend by prompting the user for a color they want to paint the walls. Calculate and output the tota...

Questions in other subjects:

Konu
Mathematics, 24.07.2019 07:00