subject

In this lab, you will use what you have learned about accumulating totals in a single-level control break program to complete a Python program. The program should produce a report for a supermarket manager to help her keep track of hours worked by her part-time employees. The report should include the day of the week and the number of hours worked for each employee for each day of the week and the total hours for the day of the week. The student file provided for this lab includes the necessary variable declarations and input and output statements. You need to implement the code that recognizes when a control break should occur. You also need to complete the control break code. Be sure to accumulate the daily totals for all days in the week. Comments in the code tell you where to write your code. Instructions
Study the prewritten code to understand what has already been done. Write the control break code Execute the program using the following input values:
Monday 6 Tuesday 2 Tuesday 3 Wednesday 5 Wednesday 3 Thursday 6 Friday 3 Friday 5 Saturday 7 Saturday 7 Saturday 7 Sunday 0 done
Assignment:HEAD1 = "WEEKLY HOURS WORKED"DAY_FOOTER = "Day Total "SENTINEL = "done" # Named constant for sentinel valuehoursWorked = 0 # Current record hourshoursTotal = 0 # Hours total for a dayprevDay = "" # Previous day of weeknotDone = True # loop control# Print two blank lines. print("\n\n")# Print heading. print("\t" + HEAD1)# Print two blank lines. print("\n\n")# Read first recorddict1={"mon":0,"tue":0,"wed": 0,"thr":0,"fri":0,"sat":0,"sun":0}d ef dayChange(dayOfWeek, hoursWorked):if dayOfWeek in dict1:dict1[dayOfWeek]+= int(hoursWorked)while True:dayOfWeek = input("Enter day of week or write 'done' to quit: ")if dayOfWeek == 'done':breakelse:hoursWorked = input("Enter hours worked: ")prevDay = dayOfWeekdayChange(dayOfWeek, hoursWorked)for key, values in dict1.items():print("\t" + DAY_FOOTER + key + ":"+values)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:00
For all machines-not just hammers- the user applies force force to the machine to the machine over a certain distance. a. input b. output c. duo d. none of the above
Answers: 1
question
Computers and Technology, 22.06.2019 08:10
Technician a says that if a valve is open when a piston rises to the very top of a cylinder, the piston may actually strike the valve head and cause serious engine damage. technician b says if the camshaft is located in the engine block, then the engine is called an overhead valve engine, ohv engine, or an in-block camshaft. who is right? a. b only b. both a and b c. a only d. neither a nor b
Answers: 3
question
Computers and Technology, 22.06.2019 12:40
How do i get the most points, without any effort?
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Corey set up his presentation for delivery to his team.the information he had to convey was critical to their job performance.he knew he would need a lot of time to explain each point
Answers: 3
You know the right answer?
In this lab, you will use what you have learned about accumulating totals in a single-level control...
Questions
question
Social Studies, 10.09.2021 06:20
question
Mathematics, 10.09.2021 06:20
question
Social Studies, 10.09.2021 06:20
question
English, 10.09.2021 06:20
question
Geography, 10.09.2021 06:20
Questions on the website: 13722367