List of Programs Adv Python
List of Programs Adv Python
List of Programs Adv Python
SEMESTER-EVEN
16. Write a program to create class Employee. Display the personal information
and salary details of 5 employees using single inheritance.
17. WAP that extends the class Employee. Derive two classes Manager and Team
Leader from Employee class. Display all the details of the employee working
under a particular Manager and Team Leader.
18. Write a program that has a class Point. Define another class Location which
has two objects (Location and destination) of class Point. Also, define a function
in Location that prints the reflection on the y-axis.
19. WAP that create a class Student having attribute as name and age and Marks
class inheriting Students class with its own attributes marks1, marks2 and
marks3 as marks in 3 subjects. Also, define the class Result that inherits the
Marks class with its own attribute total. Every class has its own display()
method to display the corresponding details. Use __init__() and super() to
implement the above classes.
20. Write a program that create a class Distance with members km and metres.
Derive classes School and office which store the distance from your house to
school and office along with other details.
21. Write a program to create an abstract class Vehicle. Derive three classes Car,
Motorcycle and Truck from it. Define appropriate methods and print the details
of vehicle.
22. Write a program that has a class Polygon. Derive two classes Rectangle and
triangle from polygon and write methods to get the details of their
dimensionsand hence calculate the area.
23. Write a program that extends the class Shape to calculate the area of a circle
and a cone .(use super to inherit base class methods)
24. Write a program to demonstrate hybrid inheritance and show MRO for each
class.
25. Write a program to overload + operator to multiply to fraction object of fraction
class which contain two instance variable numerator and denominator. Also,
define the instance method simplify() to simplify the fraction objects.
26. Write a program to compare two-person object based on their age by
overloading > operator.
27. Write a program to overload inoperator.
28. WAP to create a Complex class having real and imaginary as it attributes.
Overload the +,-,/,* and += operators for objects of Complex class.
29. Write a program to inspect the object using type() ,id(), isinstance(), issubclass()
and callable() built-in function.
30. WAP to inspect the program code using the functions of inspect module.
31. Write a program to create a new list containing the first letters of every
element in an already existing list.
32. Write a program using reduce() function to calculate the sum of first 10 natural
numbers
33. Write a program that convert a list of temperatures in Celsius into Fahrenheit
using map() function.
34. Write a program that creates an iterator to print squares of numbers.
35. Write a program that create a custom iterator to create even numbers.
36. Write a program to create a generator that starts counting from 0 and raise an
exception when counter is equal to 10.
37. Write a program to create a generator to print the Fibonacci number.
38. Write a program to create an arithmetic calculator using tkinter.
39. Write a program to draw colored shapes (line, rectangle, oval) on canvas.
40. Write a program to create a window that disappears automatically after 5
seconds.
41. Write a program to create a button and a label inside the frame widget. Button
should change the color upon hovering over the button and label should
disappear on clicking the button.
42. Write a program to create radio-buttons (Male, Female, and Transgender) and a
label. Default selection should be on Female and the label must display the
current selection made by user.
43. Write a program to display a menu on the menu bar.
44. Write a NumPy program to create an array of (3, 4) shape, multiply every
element value by 3 and display the new array.
45. Write a NumPy program to compute the multiplication of two given matrixes.
46. Write a Program to create a series from a list, numpy array and dict.
47. Write a Program to convert a numpy array to a dataframe of given shape.
48. Write a program to count number of missing values in each column.
49. Write a program to replace missing values in a column of a dataframe by the
mean value of that column.
50. Write a Pandas program to create a line plot of the opening, closing stock
prices of Alphabet Inc. between two specific dates. Use the
alphabet_stock_data.csv file to extract data.