I do not understand why it is printing “None”. Could someone explain??
(I am just learning, started maybe 3 week ago)
CODE
class Employee:
def init (self,name,age,salary,gender):
self.name = name
self.age = age
self.salary = salary
self.gender = gender
def show_details(self):
print("The name of the Employee is ", self.name)
print("The age of Employee is ", self.age)
print("The salary of Employee is ",self.salary)
print("The gender of Employee is ", self.gender)
e1 = Employee(‘Lori’, 37, 79000, ‘Female’)
e2 = Employee(‘Jon’, 40 , 40000, ‘Male’)
print(e1.show_details())
print(e2.show_details())
OUTPUT
The name of the Employee is Lori
The age of Employee is 37
The salary of Employee is 79000
The gender of Employee is Female
None
The name of the Employee is Jon
The age of Employee is 40
The salary of Employee is 40000
The gender of Employee is Male
None