Last active
May 14, 2020 19:20
-
-
Save Deep18-03/46ca6eee9b1db1b4f9b6a903157457c4 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=9 | |
def __init__(self,aname,asalary,arole): | |
self.name=aname | |
self.salary=asalary | |
self.role=arole | |
def printable(self): | |
return f"name:{self.name} salary:{self.salary} role:{self.role}" | |
@staticmethod | |
def printgood(string): | |
"""This is static method""" | |
print("This is simple program for python written by"+ string) | |
carry=Employee("carry",423874,"Engineer") | |
print(carry.printable()) | |
carry.printgood("deep") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment