Category Archives: Python OOP

Python Circle Class With Getter Setter Methods

Python Circle Class With Getter Setter. In this Python programming tutorial we will learn about the use of Getter and Setter methods. How can we provide a getter and setter method for each variable in a Python class? What are Getter and Setter Methods in Python class? A getter method is actually an Accessor Method… Read More »

 844 total views,  2 views today

Python Create New Class Rectangle

Topic: Python Create New Class Rectangle Write a Python Program to perform the above mentioned OOP concepts. The Rectangle class will have: Two instance variables: length and width Two instance methods: compute_area() and compute_perimeter() The formula of area of rectangle is to multiply length of rectangle by the width of the rectangle. Similarly, the formula… Read More »

 4,953 total views,  26 views today