Question: IN PYTHON USING ARRAYS WITHOUT NUMPY, USING CLASS AND METHODS Program 5: Design (pseudocode) and implement (source code) a program (name it WeeklyHours) to compute

IN PYTHON USING ARRAYS WITHOUT NUMPY, USING CLASS AND METHODS

Program 5: Design (pseudocode) and implement (source code) a program (name it WeeklyHours) to compute the total weekly hours for 3 employees. The program main method defines a two-dimensional array of size 3x7 to store employers daily hours for the week. Each row represents one employee and each column represent one day of the week such that column 0 designates Monday, column 1 designates Tuesday, etc. The program main method populates the array with random numbers between 0 and 10 and then prints out the array in rows and columns as shown below. The main method then calls method addHours() that takes a two-dimensional array as a parameter and displays the total weekly hours for each employee as shown below. Document your code and properly label the outputs as shown below.

Sample run 1:

Employees Data:

Mon Tue Wed Thu Fri Sat Sun

Employee1 5 3 2 9 6 5 7

Employee2 7 6 8 5 5 4 5

Employee3 1 2 2 1 5 8 7

Employee# Weekly Hours

----------------------------

1 37

2 40

3 26

Sample run 2:

Employees Data:

Mon Tue Wed Thu Fri Sat Sun

Employee1 10 2 7 2 0 3 8

Employee2 5 6 1 5 1 4 2

Employee3 1 5 2 6 4 8 7

Employee# Weekly Hours

----------------------------

1 32

2 24

3 33

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!