This is my Employee
class:
class Employee:
def __init__(self, first, last, pay):
self.first = first # Instance Variable
self.last = last # Instance Variable
self.pay = pay # Instance Variable
self.email = first + '.' + last + '@gmail.com' # Instance Variable
def fullname(self): #method inside the class
return '{} {}'.format(self.first, self.last)
def apply_raise(self):
self.pay = int(self.pay * 3 )
emp_1 = Employee('Corey', 'Schafer' , '5000')
emp_1.apply_raise()
print(emp_1.pay)
I want to get the result 5000 * 3 = 15000
after calling the method apply_raise
but instead, I am getting 5000 three times like this:
500050005000