Question: Write a code where you provide the names and working hours of 5 workers as TWO separate lists as Workers = [ Ahmad , Ali,
Write a code where you provide the names and working hours of workers as TWO separate lists as WorkersAhmad Ali, Muhammad, Salih, Waleed Workerhours The hourly rate is fixed to $ For these workers you have to write a report saying: For worker who worked for hours including over time Hours of overtime, for an hourly rate of: hourly rate and overtime rate: overtime rate his gross pay is: gross pay
Note that gross pay is calculated as: Hours Hourly Rate
An important point is that pay above will get an hourly wage time the regular wage
Hint: use lenlistlistname to find the number of elements in the list and then make use of while statement. Also note that, in order you refer a particular list element we use listnameindex eg in Workers list, Ahmad is at index therefore to refer to Ahmad or the first element we use Workers
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
