Question: import math # Step 1 : Read inputs wall _ height = float ( input ( ) ) wall _ width = float ( input

import math
# Step 1: Read inputs
wall_height = float(input())
wall_width = float(input())
cost_of_one_paint_can = float(input())
# Step 1: Calculate wall area
wall_area = wall_height * wall_width
print(f"Wall area: {wall_area:.1f} sq ft")
# Step 2: Calculate paint needed (1 gallon covers 350 sq ft)
paint_needed = wall_area /350
print(f"Paint needed: {paint_needed:.3f} gallons")
# Step 3: Calculate the number of cans needed
cans_needed = math.ceil(paint_needed)
print(f"Cans needed: {cans_needed} can(s)")
# Step 4: Calculate paint cost
paint_cost = cans_needed * cost_of_one_paint_can
# Step 4: Calculate sales tax (7%)
sales_tax =0.07* paint_cost
# Step 4: Calculate total cost
total_cost = paint_cost + sales_tax
# Step 4: Output paint cost, sales tax, and total cost
print(f"Paint cost: ${paint_cost:.2f}")
print(f"Sales tax: ${sales_tax:.2f}")
print(f"Total cost: ${total_cost:.2f}")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!