Python Basics6(init method)

class pythonTraining :
 def__init__(self,a,b) :
  print("my name is tejanth");
  self.pen=a;
  self.book=b;
 def.display(self):
  print("my book is "+self.book);
  print("my pen is"+self.pen);
#object creation
x=pythontraining('parker','whitenote');
x.dispaly();
y=pythontraining('reynolds','rulenotebook');
y.display();

Comments

Popular posts from this blog

Swayamvar Program In Python

VALDATION IN JAVASCRIPT