Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Email id -
Yash.patel_2017@sakec.ac.in
Abstract-- Python is a multi-paradigm programming data and behaviour are called as attributes and object
language. Meaning, it supports different programming respectively in object oriented programming(oops).And a
approach. One of the approach to solve a programming Class is the blueprint from which individual objects are
problem is by creating objects. This is known as created
Object-Oriented Programming (OOP) . Python , an
object-oriented very-high-level language , zcan be used A constructor is a special type of method (function) which is
to extend legacy codes. .Constructors in python generally used to initialize the instance members of the class.
used for instantiating an object.The task of constructors is
to initialize(assign values) to the data members of the class Constructors can be of two types.:
when an object of class is created
1. Parameterized Constructor
2. Non-parameterized Constructor
I. INTRODUCTION
The example for object of studentt class can be: It takes the self-keyword to tell the interpreter to work
with attributes of this object. It should be the first
parameter.
a = student()
It takes no parameters.
rollno of student is : 47
age of student is : 20
marks of student is : 95
division of student is : 5
Conclusion
REFRENCES
[3]
https://data-flair.training/blogs/python-constructor/
[4] https://www.javatpoint.com/python-constructors
Acknowledgement