Sample codes
class Employee:
def set_name(self, new_name):
self.name = new_name
def set_salary(self, new_salary):
self.salary = new_salary
emp = Employee()
emp.set_name('Korel Rossi')
emp.set_salary(50000)
class Employee:
def set_name(self, new_name):
self.name = new_name
def set_salary(self, new_salary):
self.salary = new_salary
def give_raise(self, amount):
self.salary = self.salary + amount
def monthly_salary(self):
return self.salary / 12
emp = Employee()
emp.set_name('Korel Rossi')
emp.set_salary(50000)
mon_sal = emp.monthly_salary()
print(mon_sal)