Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A program to calculate the area of a room in order to purchase cans of paint. Based on the scenario you selected earlier modules, you

A program to calculate the area of a room in order to purchase cans of paint. Based on the scenario you selected earlier modules, you must now add at least 1 menu to your program. You need to submit updated documentation of this addition that includes the following: Pseudocode that illustrates all calculations and a swap module(s). Your updated flowchart must depict each step in the program, including the swapping. All symbols must be connected by arrows that represent the flow of the program. The flow must make logical sense. Your revised flowchart must illustrate the logic of your input validation loop. It can be done in any programming language c++, Java, Python. If you can give me flow chart as well, I have already done If then else, I have already added 1 module in the program, I have added 1 input validation and added 1 array to the program. This just one last thing is eating my head. I will really appreciate some help.

Flow chart I need is for the module answer I have requested, basically to draw a flowchart of the pseudocode you will write for me. And to get an idea about My previous module I am copy pasting that below this line:

Pseudocode:

def main():

length = int(input('Enter room length (in meters): '))

width = int(input('Enter room width (in meters): '))

height = int(input('Enter room height (in meters): '))

area_per_lt = 5.00 # 1 lt paint can paint 5 square meters

can_volume = 15 # each paint can , holds 20 lts of paint

can_price = 5.99

wall_area = 2 * (length * height + width * height)

roof_area = length * width

total_area = wall_area + roof_area

total_lts = total_area / area_per_lt # total lts of paint needed

cans_needed = total_lts / can_volume

# convert the decimal to integer count

if int(cans_needed) < cans_needed:

cans_needed = int(cans_needed) + 1

else:

cans_needed = int(cans_needed)

# print the total cans needed

print('Total Paint Cans Needed = {}'.format(cans_needed))

# print the total price of all cans

print('Total Price: ${:.2f}'.format(cans_needed*can_price))

main()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions