May-04-2024, 11:12 AM
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
class Employee: no_of_employees = 0 raise_amount = 1.04 def __init__( self , first, last, pay): self .first = first self .last = last self .pay = pay self .email = first + '.' + last + '@company.com' def fullname( self ) - > str : return '{} {}' . format ( self .first, self .last) def apply_raise( self ): self .pay = int ( self .pay * self .raise_amount) Emp1 = Employee( 'foo' , 'bar' , 50000 ) print (Emp1.apply_raise()) |
Output:None
I would like to understand where I am going wrong. I am expecting the output to be 52,000.