Create Employee class with some attributes and method
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()
Comments
Leave a comment