#class Employee:
  #  def employeeDetails():
   #     pass

#employee =Employee()
#employee.employeeDetails()#this is treated as Employee.employeeDetails(employee).so shows an error and this can be rewritten using giving some argument given below

class Employee:
    def employeeDetails(self):
        self.name='rohith'   #lifespan of self is higher and can be used in another method also  
        print(self.name )
        age='30'
        print(age)
    def printEmployeeDetails(self):
        print("Name:",self.name)
     #   print("Age",age)  -this will show error
employee=Employee()
employee.employeeDetails()
employee.printEmployeeDetails()
2d7f76c1c4dac031f154088832b493630a9965bc
class Employee:

    def employeeDetails(self):
        self.name = 'rohith'
        print(self.name)
        age = '30'
        print(age)
    <mask token>


<mask token>

class Employee:

    def employeeDetails(self):
        self.name = 'rohith'
        print(self.name)
        age = '30'
        print(age)

    def printEmployeeDetails(self):
        print('Name:', self.name)


<mask token>

class Employee:

    def employeeDetails(self):
        self.name = 'rohith'
        print(self.name)
        age = '30'
        print(age)

    def printEmployeeDetails(self):
        print('Name:', self.name)


<mask token>
employee.employeeDetails()
employee.printEmployeeDetails()

class Employee:

    def employeeDetails(self):
        self.name = 'rohith'
        print(self.name)
        age = '30'
        print(age)

    def printEmployeeDetails(self):
        print('Name:', self.name)


employee = Employee()
employee.employeeDetails()
employee.printEmployeeDetails()

#class Employee:
  #  def employeeDetails():
   #     pass

#employee =Employee()
#employee.employeeDetails()#this is treated as Employee.employeeDetails(employee).so shows an error and this can be rewritten using giving some argument given below

class Employee:
    def employeeDetails(self):
        self.name='rohith'   #lifespan of self is higher and can be used in another method also  
        print(self.name )
        age='30'
        print(age)
    def printEmployeeDetails(self):
        print("Name:",self.name)
     #   print("Age",age)  -this will show error
employee=Employee()
employee.employeeDetails()
employee.printEmployeeDetails()