Please help.. this does not work…
Question Answered step-by-step Please help.. this does not work… Please help.. this does not work # SuperMarket.py – This program creates a report that lists weekly hours worked # by employees of a supermarket. The report lists total hours for # each day of one week. # Input: Interactive# Output: Report. # Declare variables.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 controldays=[‘Sunday’, ‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’]dayTotals=[0,0,0,0,0,0,0]print (“nn”)print(“t”+HEAD1)print(“nn”) dayOfWeek= input(“Enter day of Week or done to quit:”)if dayOfWeek==SENTINEL: notDone=Falseelse: hoursWorked=input(“Enter hours worked:”) prevDay=dayOfWeekwhile notDone==True: for i, day in enumerate(days): if day==dayOfWeek: dayTotals[i]+=int(hoursWorked) print(“t”+DAY_FOOTER+ str(hoursTotal)) dayOfWeek=input(“Enter day of week or done to quit:”) if dayOfWeek==SENTINEL: notDone=False else: hoursWorked=input(“Enter hours worked:”) prevDay=dayOfWeek for i, hours in enumerate(dayTotals): if hours!=0: print(days[i]) print(hours) Computer Science Engineering & Technology Python Programming CIT 1113 Share QuestionEmailCopy link Comments (0)


