You are on page 1of 3

PRACTICAL-4

STRUCTURED TYPES, MUTABILITY AND HIGHER-ORDER FUNCTIONS


Tuples, Lists and Mutability, Functions as Objects, Strings, Tuples and Lists,
Dictionaries

COMPILER USED : IDLE SHELL 3.10.2

1. WAP with function QnR(n,d) that returns quotient and reminder after dividing n by d.

Source code:-

Output:

2. WAP that takes two lists and returns True if they have at least one common member.
Output:

3. WAP program to print a specified list after removing the 0th, 2nd, 4th and 5th elements.

Source code:-

Output:

4. Formulate a problem definition of your own and demonstrate functions as objects.

Source code:-

Output:
5. Formulate a problem of your own and demonstrate list mutability in python.

Source code:-

Output:

6. WAP to check whether an input sentence is a pangram or not. (Pangrams are words or sentences containing
every letter of the alphabet at least once)

Source code:-

Output:

You might also like