I'm writing this program copying from the online course I'm learning, I've copied exactly the same still it is not working for me. definitely there is an error when an output is not coming. But I'm unsure as to where the error is. So i'm trying to get the output for employee of month and current_max for a tuple that is created. to figure out which person is employee of month and the time he spent.
work_hours = [('sam', 300), ('ream',200), ('deam', 400)]
def employee_check (work_hours) :
current_max = 0
employee_of_month = ''
for employee, hours in work_hours:
if hours > current_max:
current_max = hours
employee_of_month = employee
else:
pass
return (employee_of_month, current_max)
employee_check(work_hours)