Question #329337

Create Employee class with some attributes and method


Expert's answer

class Employee:
   def __init__(self, name, salary):
      self.name = name
      self.salary = salary
     


   def displayEmployee(self):
      print(f"Name : {self.name}, Salary: {self.salary}")
      
emp=Employee("Peter", 522000)
emp.displayEmployee()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS