Can you fix this code? PYTHON LANGUAGE paste your runnable code and screenshot of your output.
SAMPLE OUTPUT
#declare 2D list for work hours for employees#from tabulate import tabulate
hours = []#declare 1D array for the daysdays=["Sun","Mon", "Tue","Wed", "Thu","Fri", "Sat"]#use nested loop to enter work hours for each employeefor i in range(3):#inner loop to take hours for each day col = []for j in range(7): print("Enter number of hour works hour for Employee "+str(i)+" at "+days[j])col.append(int(input()))hours.append(col)print(" Summary of entry\n===================================================================");#print(tabulate(hours, headers=days))print("\t\t\t",end=" ")for j in range(7): print ("{:<4}".format(days[j]),end="\t")print("\n")for i in range(3): print("Employee "+str(i), end="\t ")for j in range(7): print(hours[j],end="\t\t")print("\n")
Write a python program that will allow a user to enter work hours of 3 employees from Sunday- Saturday. Guide: 1. Declare 2D list for the work hours of employees, the size is 3,7 2. Declare 1D list for the days. ("Sun","Mon".... 3. Use nested for loop for entering the work hourd of each employee 4. Use single for loop for displaying the Sun-Sat words below the ENTRY SUMMARY 5. Use nested for loop in displaying the entry summary matrix and it should be match to the entered values above. 6. New Line, Spacing and Tab sequences are also useful to make the program output more organize. Use \t, and \n. Sample Output Blue Terminal Window-Nadela Cru Option Enter number of hour works hour for Employee at Sun:5 Enter number of hour works hour for Employee at Mon:6 Enter number of hour works hour for Employee 0 at Tue:7 Enter number of hour works hour for Employee 8 at Wed:9 Enter number of hour works hour for Employee at Thu:1 Enter number of hour works hour for Employee 0 at Fri:2 Enter number of hour works hour for Employee 0 at Sat:3 Enter number of hour works hour for Employee 1 at Sun:5 Enter number of hour works hour for Employee 1 at Mon: 8 Enter number of hour works hour for Employee 1 at Tue:6 Enter number of hour works hour for Employee 1 at Wed:7 Enter number of hour works hour for Employee 1 at Thu:6 Enter number of hour works hour for Employee 1 at Fri:5 Enter number of hour works hour for Employee 1 at Sat:8 Enter number of hour works hour for Employee 2 at Sun:6 Enter number of hour works hour for Employee 2 at Mon:7 Enter number of hour works hour for Employee 2 at Tue: 8 Enter number of hour works hour for Employee 2 at Wed:5 Enter number of hour works hour for Employee 2 at Thu:6 Enter number of hour works hour for Employee 2 at Fri:8 Enter number of hour works hour for Employee 2 at Sat:3 Employee 8 Employee 1 Employee 2 Sun 556 Mon 687 Tue 7 6 8 Wed 9 7 5 SUMMARY OF ENTRY Thu 1 6 6 Fri 2 5 8 Sat 3 8 3
Can you fix this code? PYTHON LANGUAGE paste your runnable code and screenshot of your output. SAMPLE OUTPUT #declare 2
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am