subject

(1) Prompt the user to input a wall's height and width. Calculate and output the wall's area (integer). (Submit for 2 points). Enter wall height (feet): 12 Enter wall width (feet): 15 Wall area: 180 square feet

(2) Extend to also calculate and output the amount of paint in gallons needed to paint the wall (floating point). Assume a gallon of paint covers 350 square feet. Store this value in a variable. Output the amount of paint needed using the %f conversion specifier. (Submit for 2 points, so 4 points total). Enter wall height (feet): 12 Enter wall width (feet): 15 Wall area: 180 square feet Paint needed: 0.514286 gallons

(3) Extend to also calculate and output the number of 1 gallon cans needed to paint the wall. Hint: Use a math function to round up to the nearest gallon. (Submit for 2 points, so 6 points total). Enter wall height (feet): 12 Enter wall width (feet): 15 Wall area: 180 square feet Paint needed: 0.514286 gallons Cans needed: 1 can(s)

(4) 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. (Submit for 2 points, so 8 points total).

Enter wall height (feet): 12 Enter wall width (feet): 15 Wall area: 180 square feet Paint needed: 0.514286 gallons Cans needed: 1 can(s) Choose a color to paint the wall: red Cost of purchasing red paint: $35

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:30
Given a link with a maximum transmission rate of 32.8 mbps. only two computers, x and y, wish to transmit starting at time t = 0 seconds. computer x sends filex (4 mib) and computer y sends filey (244 kib), both starting at time t = 0. statistical multiplexing is used, with details as follows packet payload size = 1000 bytes packet header size = 24 bytes (overhead) ignore processing and queueing delays assume partial packets (packets consisting of less than 1000 bytes of data) are padded so that they are the same size as full packets. assume continuous alternating-packet transmission. computer x gets the transmission medium first. at what time (t = ? ) would filey finish transmitting? give answer in milliseconds, without units, and round to one decimal places (e.g. for an answer of 0.013777 seconds you would enter "13.8" without the quotes)
Answers: 3
question
Computers and Technology, 23.06.2019 19:30
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
question
Computers and Technology, 23.06.2019 21:00
Alcohol’s affects on the cornea and lens of the eye make it more difficult
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
What did i do wrong with this const discord = require('discord.js'); var bot = new discord.client(); const token = 'ntm3mjcxmtu1mjg3ote2ntq2.dyogew.dpfiwfpuifzuzvifop-csuxasnm' const prefix = "! " bot.registry.registergroup('simple', 'simple'); bot.registry.registerdefaults(); bot.registry. + '/commands'); bot.on('message', message => { if(message.content == 'hi! ') { message.channel.send ('@everyone sup, how is @everyone day going'); } if(message.content == 'h3lp') { message.channel.send ('dose not have any commands yet'); } bot.on('ready', function() { console.log("ready") }); bot.login(token);
Answers: 1
You know the right answer?
(1) Prompt the user to input a wall's height and width. Calculate and output the wall's area (intege...
Questions
question
Social Studies, 06.12.2020 01:00
question
Mathematics, 06.12.2020 01:00
question
Mathematics, 06.12.2020 01:00
question
Mathematics, 06.12.2020 01:00
question
Biology, 06.12.2020 01:00
question
Mathematics, 06.12.2020 01:00
Questions on the website: 13722360