class Employee: def __init__(self): self.employees = [] def addEmployee(self,empID, name, jdate, depart, desi, basic, hra, da, it): self.employees.append([empID, name, jdate, depart, desi, basic, hra, da, it]) def displayEmp(self, empID=None): found = False for emp in self.employees: if(emp[0] == int(empID)): print ("Employee ID: ", emp[0]) print ("Name of Employee is: ", emp[1]) print ("Employee Join date: ", emp[2]) print ("Department of Employee: ", emp[3]) print ("Designation of Employee: ", emp[4]) print ("basic of Employee: ", emp[5]) print ("hra of Employee: ", emp[6]) print ("da of Employee: ", emp[7]) print ("it of Employee: ", emp[8]) found = True return True if(found==False): print(f"{empID} - Employee not found in the database !!!!") site = Employee() site.addEmployee(1001, "Ashish", "01/04/2009", "R$D", "Engineer", 20000, 8000, 20000, 3000) site.addEmployee(1002, "Sushma", "23/08/2012", "PM", "Consultant", 30000, 12000, 32000, 9000) site.addEmployee(1003, "Rahul", "12/11/2008", "Acct", "Clerk", 10000, 8000, 12000, 1000) site.addEmployee(1004, "Chahat", "29/01/2013", "Front Desk", "Receptionist", 12000, 6000, 15000, 2000) site.addEmployee(1005, "Ranjan", "16/01/2013", "Engg", "Manager", 50000, 20000, 40000, 20000) site.addEmployee(1006, "Suman", "1/1/2000", "Manyfacturing", "Engineer", 23000, 9000, 20000, 4400) site.addEmployee(1007, "Tanmay", "12/06/2006", "PM", "Consultant", 29000, 12000, 32000, 10000) # emp1 = Employee (1001, "Ashish", "01/04/2009", "R$D", "Engineer", 20000, 8000, 20000, 3000) # emp2 = Employee (1002, "Sushma", "23/08/2012", "PM", "Consultant", 30000, 12000, 32000, 9000) # emp3 = Employee (1003, "Rahul", "12/11/2008", "Acct", "Clerk", 10000, 8000, 12000, 1000) # emp4 = Employee (1004, "Chahat", "29/01/2013", "Front Desk", "Receptionist", 12000, 6000, 15000, 2000) # emp5 = Employee (1005, "Ranjan", "16/01/2013", "Engg", "Manager", 50000, 20000, 40000, 20000) # emp6 = Employee (1006, "Suman", "1/1/2000", "Manyfacturing", "Engineer", 23000, 9000, 20000, 4400) # emp7 = Employee (1007, "Tanmay", "12/06/2006", "PM", "Consultant", 29000, 12000, 32000, 10000) print('----------------------------------------------\n') print(' Welcome to the Employee Management system -\n') print('----------------------------------------------\n') print("Employee Salary Slip: \n") inp = input('Enter Employee ID: ') site.displayEmp(inp)