Skip to content

Instantly share code, notes, and snippets.

@libert-xyz
Created January 3, 2017 04:22
Show Gist options
  • Save libert-xyz/2d964116425002a7b39c7d6963c016f0 to your computer and use it in GitHub Desktop.
Save libert-xyz/2d964116425002a7b39c7d6963c016f0 to your computer and use it in GitHub Desktop.
employee class
#Python OOP
class Employee:
raise_amount = 1.04
num_emp = 0
def __init__(self,first,last,pay):
self.First = first
self.Last = last
self.Pay = pay
self.Email = first + '.' + last + '@nuvops.com'
Employee.num_emp += 1
def fullname(self):
return '{} {}'.format(self.First,self.Last)
def apply_raise(self):
self.Pay = int(self.Pay * self.raise_amount)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment