Computer Science, asked by Anonymous, 2 months ago

A binary file ‘Employee.dat’ has structure [Employee_no, Name, Sex,

Department]. Write a function countEmp(Dept) in Python which accepts the

Employee department as parameter and count and return the number of

employees those are working in same department​

Answers

Answered by nidaeamann
5

Explanation:

Python is a very powerful computer language and fins application in many industries and functions

The requirement given in question statement can be addressed as;

class Dept(

int Employee_no

char  Name

char Sex)

def countEmp(Dept department)

int count = 0;

employee_numbers = department.Employee_no

for employee in employee_numbers:

     count = count + 1

print ("Tota employees are" + count)

end

Answered by Anonymous
5

Explanation:

All the best aapko 4th May se exam h Mai app delete Kar Rahi Hun so Bye and thanks mere Sare questions Ka answer Karne k liye

Similar questions