Created
May 16, 2020 11:20
-
-
Save Deep18-03/8518ad64da82e254f1cf684f388951f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Employee: | |
no_of_leaves=5 | |
def __init__(self,name,salary,role): | |
self.name=name | |
self.salary=salary | |
self.role=role | |
def printdetail(self): | |
return f"name is {self.name}.Salary is {self.salary}.Role is {self.role}" | |
class Player: | |
no_of_games=9 | |
no_of_leaves = 6 | |
def __init__(self,name,game): | |
self.name=name | |
self.game=game | |
def printdetail(self): | |
return f"name is {self.name}.Salary is {self.game}" | |
class bestProgrammer(Employee,Player): | |
language="python" | |
def print(self): | |
return f"name is {self.name}.Salary is {self.salary}.Role is {self.role},{self.language}" | |
mohan=bestProgrammer("Mohan",123,"student") | |
print(mohan.printdetail()) | |
print(mohan.print()) | |
print(mohan.no_of_leaves) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment