Answer to Question #329337 in Python for Shubham Tiwari

Question #329337

Create Employee class with some attributes and method


1
Expert's answer
2022-04-16T09:02:38-0400
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS