WEEK-3
Write a Python program that inputs a list of words, separated by white space, and outputs how many times each word appears in the list.
Program:
Output:
WEEK-3
Write a Python program that inputs a list of words, separated by white space, and outputs how many times each word appears in the list.
Program:
Output:
WEEK-2
Develop an inheritance hierarchy based upon a Polygon class that has abstract methods area () and perimeter (). Implement classes Triangle, Quadrilateral, Pentagon, that extend this base class, with the obvious meanings for the area () and perimeter () methods. Write a simple program that allows users to create polygons of the various types and input their geometric dimensions, and the program then outputs their area and perimeter.
Program:
WEEK-1
Write a Python program for class, Flower, that has three instance variables of type str, int, and float, that respectively represent the name of the flower, its number of petals, and its price. Your class must include a constructor method that initializes each variable to an appropriate value, and your class should include methods for setting the value of each type, and retrieving the value of each type.
Program:
Write a program to implement Tree Traversal Algorithms Preorder Inorder Postorder Program: Output: