Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Execute Python-3 Online

class Person:
  def __init__(self,name,age,height):
    self.name=name
    self.age=age
    self.height=height
  def eat(self):
	  print('Eating')
  def walk(self):
    print('Walking')
  def getname(self):
    return self.name
p1=Person('Mansuri',18,4)
print(p1.eat())

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.