Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

NATIONAL PUBLIC SCHOOL, Gopalapuram

Grade:XII WORKSHEET 2 [2024 – 2025]


Pages :1 COMPUTER SCIENCE
CHAPTER 3-Working with Functions
Name: ….................................................. Section: …… Roll No: ……… Date: …………………

Functions-Lists
1. Write a program using function to count the number of elements in the list.
2. Write a program using function to remove an empty element from the list.

3. Write a program using function to display all the elements from the list which are
divisible by5.

4. Write a program to remove the duplicate elements from the list.

Functions-Strings
1. Write a program using functions to reverse a given string.

2. Write a program using functions to count the vowels and consonants in a given string.

3. Write a program using functions to count the number of letters in a word.

4. Write a program using functions to count the occurrence of each character in a word.

Functions-Dictionaries
1. Write a program using function to check if a given key is present in the dictionary or
not.

2. Write a program using function to map two lists to a dictionary.

3. Write a program using function to concatenate two dictionaries.

4. Write a program using function to find the sum of the values in the dictionary.

You might also like