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 04:00
Chloe is building a kiosk-based excel application. she wants to make some modifications to the screen elements in order to keep users from being distracted by parts of the application that are irrelevant to her application. she turns to henry for guidance as she knows he built a similar solution earlier this year.chloe has decided to hide the worksheet gridlines and the vertical scroll bar. what does henry tell her to use to do this? a) screen elements dialog boxb) display options dialog boxc) customization dialog boxd) excel options dialog box
Answers: 2
question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
question
Computers and Technology, 23.06.2019 21:00
Alcohol’s affects on the cornea and lens of the eye make it more difficult
Answers: 1
question
Computers and Technology, 24.06.2019 18:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best-suited for this?
Answers: 1
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
Computers and Technology, 02.12.2021 01:00
question
Computers and Technology, 02.12.2021 01:00