Python : Class and Object - Exercises and Solution


1. Write a python program to Create Student Class

View Solution

2. Write a python program to Create Student Class with Constructor and Destructor

View Solution

3. Write a python program to implement Getters and Setters in a class

View Solution

4. Write a python program to Implement Abstraction using Abstract class

View Solution

5. Write a python program to Implement Interface using class

View Solution

6. Write a program to single inheritance in Python

View Solution

7. Write a program to inheritance with two child (derived) classes in Python

View Solution

8. Write a program to multiple inheritance in Python

View Solution

9. Write a python program to check prime number using object oriented approach

View Solution

10. Write a python program to count number of objects created

View Solution

11. Write a python program to check Armstrong number using object oriented approach

View Solution

12. Write a python program to Multilevel inheritance

View Solution

13. Write a python program to check Palindrome number using object oriented approach

View Solution

14. Write a program to Student height record program for a school in Python

View Solution

15. Write a python program to manage a phone store (mobile shop) record using class

View Solution

16. Write a python program to add two distances using class and object concepts

View Solution

17. Write a python program to find the elder person of two persons using class & object

View Solution

18. Write a python program to bank management system

View Solution

19. Write a python program to get student details as input and print the result after updating the marks

View Solution

20. Write a python program to Arrays of Objects

View Solution

21. Write a python program to Searching of objects from an array of objects using ID

View Solution

22. Write a python program to Constructor Initialization

View Solution

23. Write a python program to Parameterized Constructor and Destructor

View Solution

24. Write a python program to add objects '+' using operator

View Solution

25. Write a python program to comparison between two objects using the '>' operator

View Solution

26. Write a python program to pass objects as arguments and return objects from function

View Solution

27. Write a python program to illustrate the working of decorators

View Solution

28. Write a python program to illustrate the working of abstract method

View Solution

29. Write a python program to convert hours into days

View Solution

30. Write a python program to search objects from an array of objects using filter() method

View Solution

List of Programs


Sample Programs


Python Database Connection


Python Flask


Python Tkinder Tutorial