The Knuth Cabinet Company keeps track of labor for cutting, sanding and finishin
ID: 3880211 • Letter: T
Question
The Knuth Cabinet Company keeps track of labor for cutting, sanding and finishing their different types of cabinets. They have 3 types of cabinets, upper, lower and corner Cutting Labor Sanding Labor Finishing Labor Upper Cabinet 1.2 Hours 2.4 Hours 3.4 Hours Lower Cabinet 1.5 Hours 1.8 Hours 2.5 Hours Corner Cabinet 1.9 Hours 1.2 Hours 1.5 Hours You've been asked to write them a Python program that gets the number of upper, lower, and corner cabinets from the user, then computes the cutting, sanding, finishing and total hours Make sure you test your program thoroughly >>>RESTART22s2s Enter the number of upper cabinets: 5 Enter the number of lower cabinets: 4 Enter the number of corner cabinets: 2 Total cutting hours 15.8 Total sanding hours 21.599999999999998 Total finishing hours 30.0 Total labor hours 67.4Explanation / Answer
Answer)
num1 = input('Enter the number of upper cabinets: ') // user input number of upper cabinets = 11
num2 = input('Enter the number of lower cabinets: ') // user input number of lower cabinets = 22
num3 = input('Enter the number of corner cabinets: ') // user input number of corner cabinets = 33
cutting = 1.2*num1 + 1.5*num2 + 1.9*num3 // total cutting time of all cabinets
sanding = 2.4*num1 + 1.8*num2 + 1.2*num3 // total sanding time of all cabinets
finishing = 3.4*num1 + 2.5*num2 + 1.5*num3 // total finishing time of all cabinets
total = cutting + sanding + finishing // total labor time time of all cabinets
print("Total cutting hours: ",cutting )
print("Total sanding hours: ", sanding)
print("Total finishing hours: ",finishing )
print("Total labor hours: ",total ) // display the results
Output:
Enter the number of upper cabinets: 11
Enter the number of lower cabinets: 22
Enter the number of corner cabinets: 33
('Total cutting hours: ', 108.9)
('Total sanding hours: ', 105.6)
('Total finishing hours: ', 141.9)
('Total labor hours: ', 356.4)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.