Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print('---------------------------------------------------------------------')
- class Employee:
- num_of_emps = 0
- raise_amount = 1.04
- def __init__(self, first, last, pay):
- self.first = first
- self.last = last
- self.pay = pay
- self.email = '{}.{}@company.com'.format(first, last)
- Employee.num_of_emps += 1
- def fullname(self):
- return '{} {}'.format(self.first, self.last)
- def apply_raise(self):
- self.pay = int(self.pay * self.raise_amount)
- emp_1 = Employee('Corey', 'Schafer', 50000)
- emp_2 = Employee('Test', 'User', 60000)
- print(Employee.raise_amount)
- print(emp_1.raise_amount)
- print(emp_2.raise_amount)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement