Skip to content

Instantly share code, notes, and snippets.

@Deep18-03
Last active May 14, 2020 19:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Deep18-03/46ca6eee9b1db1b4f9b6a903157457c4 to your computer and use it in GitHub Desktop.
Save Deep18-03/46ca6eee9b1db1b4f9b6a903157457c4 to your computer and use it in GitHub Desktop.
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