0% found this document useful (0 votes)
6 views

QuestionBank-Python_Programming

The document outlines a series of Python programming tasks, including creating classes with inheritance, implementing data structures like stacks and queues, and performing mathematical checks such as prime and palindrome verification. It emphasizes object-oriented programming concepts like method polymorphism and inheritance types. Additionally, it includes practical exercises for control flow and loops.

Uploaded by

ashish.yadav
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

QuestionBank-Python_Programming

The document outlines a series of Python programming tasks, including creating classes with inheritance, implementing data structures like stacks and queues, and performing mathematical checks such as prime and palindrome verification. It emphasizes object-oriented programming concepts like method polymorphism and inheritance types. Additionally, it includes practical exercises for control flow and loops.

Uploaded by

ashish.yadav
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Write a Python program to create a class Vehicle with attributes brand and price.

Derive a class Car from it and add an additional attribute fuel_type. Implement a
constructor and a display function.
2. Write a Python program to implement multiple inheritance with at least two parent
classes and one child class.
3. Write a Python program to implement a stack using push, pop, and display
functions.
4. Write a Python program to check whether a number is prime or not.
5. Write a Python program to print: 0 1 2 4 5 using a while loop and the continue
keyword.
6. Write a Python program to demonstrate method polymorphism.
7. Write a Python program to take three numbers as input and print the greatest of
those numbers using an if-else statement.
8. Write a Python program to implement a queue.
9. Write a Python program to implement single inheritance using super().
10. Write a Python program to implement hierarchical inheritance with at least one base
class and two derived classes.
11. Write a Python program to check whether a given number is a palindrome or not.
12. Write a python program to demonstrate multilevel inheritance.

You might also like