Problem: Create a flowchart using Raptor and write pseudocode to represent a logic of a program that prompts the user for the height and width of a wall as follows. Enter the height (feet): 150 Enter the width (feet): 10 Note: The bold letters indicate the prompt to the user. The normal letters indicate user entry. The program should calculate and display the amount of paint that must be purchased to cover the wall area given one gallon of paint is needed for every 150 square feet of wall. Note: Stores do not sell fraction of gallons. Display the output as follows. The amount of paint is numGallons gallons. Based on the sample input above the output should display The amount of paint is 10 gallons.
Added by Marta H.
Close
Step 1
This indicates the beginning of the program. Show more…
Show all steps
Your feedback will help us improve your experience
Supreeta N and 91 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write a Pseudocode to represent the logic of a program that allows the user to enter values for the width and length of a room's floor in feet. The program outputs the area of the floor in square feet. Modify the program that computes floor area to compute and output the number of 6-inch square tiles needed to tile the floor.
Akash M.
3.11 Program: Painting a Wall (Python 3) (1) Prompt the user to input a wall's height and width. Calculate and output the wall's area. (Submit for 2 points). Enter wall height (feet): 12 Enter wall width (feet): 15 Wall area: 180.0 square feet (2) Extend to also calculate and output the amount of paint in gallons needed to paint the wall. Assume a gallon of paint covers 350 square feet. Store this value in a variable. (Submit for 2 points, so 4 points total). Enter wall height (feet): 12 Enter wall width (feet): 15 Wall area: 180.0 square feet Paint needed: 0.5142857142857142 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.0 square feet Paint needed: 0.5142857142857142 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.0 square feet Paint needed: 0.5142857142857142 gallons Cans needed: 1 can(s) Choose a color to paint the wall: red Cost of purchasing red paint: $35
Write a program that declares a constant named QUARTS_IN_GALLON which holds the number of quarts in a gallon (4). Also, declare a variable named quartsNeeded to represent the number of quarts needed for a painting job and assign an appropriate value. Compute and display the number of gallons and quarts needed for the job. Display explanatory text with the values—for example, A job that needs 18 quarts requires 4 gallons plus 2 quarts. When submitting the program for testing/grading, assign the value 18 to quartsNeeded.
Shelayah R.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD