Ramjas International School
Sector 4, R. K. Puram New Delhi - 110022
ANNUAL
PRACTICAL EXAM
2024-25
COMPUTER SCIENCE
083
PROGRAM FILE
BATCH 2
Submit To: Submit By:
Mr. Gajendra Sharma Name:
PGT Computer Science Class/Section:
Roll Number:
Write Code:
String Programs:
1. Write a program to check if a given string is a palindrome.
2. Count the frequency of each character in a string.
3. Reverse a string without using built-in functions.
4. Find the longest word in a given sentence.
5. Check if two strings are anagrams.
List Programs:
6. Find the second largest number in a list.
7. Remove duplicates from a list without using set().
8. Rotate a list by n positions.
9. Merge two sorted lists into a single sorted list.
10. Find the common elements between two lists.
Tuple Programs:
11. Check if an element exists in a tuple.
12. Convert a list to a tuple and vice versa.
13. Find the maximum and minimum values in a tuple.
14. Count the occurrences of an element in a tuple.
15. Concatenate multiple tuples into one.
Dictionary Programs:
16. Merge two dictionaries into one.
17. Find the key with the maximum value in a dictionary.
18. Sort a dictionary by keys and by values.
19. Invert keys and values in a dictionary.
20. Count the occurrences of each word in a string using a dictionary.
Note:
1. Please use white A4 sheets for the file.
2. Write the question, followed by the code and its output within a designated box on
one side of the page.
3. Limit each page to include only one or two pieces of code along with their respective
outputs.