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

Python Assignment 4

This document outlines problems for a Python programming assignment involving classes, functions, and lists. It includes 4 problems: 1) Creating a class to calculate the area of a triangle using a formula, with functions defined in parent and child classes. 2) Writing a function to filter a list of words that are longer than a given integer. 3) Writing a function to map a list of words to a list of their lengths. 4) Writing a function that returns True if a character is a vowel, False otherwise. Students are instructed to submit their solutions in Jupyter Notebook format for evaluation.

Uploaded by

Hrisav Bhowmick
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
187 views

Python Assignment 4

This document outlines problems for a Python programming assignment involving classes, functions, and lists. It includes 4 problems: 1) Creating a class to calculate the area of a triangle using a formula, with functions defined in parent and child classes. 2) Writing a function to filter a list of words that are longer than a given integer. 3) Writing a function to map a list of words to a list of their lengths. 4) Writing a function that returns True if a character is a vowel, False otherwise. Students are instructed to submit their solutions in Jupyter Notebook format for evaluation.

Uploaded by

Hrisav Bhowmick
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Introduction
This assignment will help you to consolidate the concepts learnt in the session.

2.Problem Statement

1.1 Write a Python Program(with class concepts) to find the area of the triangle using the below
formula.

area = (s*(s-a)*(s-b)*(s-c)) ** 0.5

Function to take the length of the sides of triangle from user should be defined in the parent
class and function to calculate the area should be defined in subclass.

1.2 Write a function filter_long_words() that takes a list of words and an integer n and returns
the list of words that are longer than n.

2.1 Write a Python program using function concept that maps list of words into a list of integers
representing the lengths of the corresponding words.
Hint: If a list [ ab,cde,erty] is passed on to the python function output should come as [2,3,4]

Here 2,3 and 4 are the lengths of the words in the list.

2.2 Write a Python function which takes a character (i.e. a string of length 1) and returns True if
it is a vowel, False otherwise.

NOTE:ThesolutionsharedthroughGithubshouldcontainthesource codeusedandthe
screenshotoftheoutput.

3.Output

This assignment consists of 200 marks and the solution file needs to be submitted in the
upcoming session in .ipynb format for evaluation.

You might also like