COMPUTER
SCIENCE
PROGRAMS
FILE
SESSION: 2025-2026
Name : Raaghav Garg
Class : XII - C
Board Roll No :
Q1) WAP that uses a function to create a
dictionary with student name as the key and
aggregate marks as the value and also search for
any student and then print aggregate marks.
Output:
Q2) WAP that uses functions to find the second largest
element of the list.
Output:
Q3) WAP to check whether the number entered by the
user is an armstrong number or not in a tuple using a
function.
Output:
Q4) WAP using function to test if the string is palindrome
or not where the string is passed as a parameter to the
function
Output:
Q5) WAP using function to store and print all positive nos
first and then all the negative nos and then the zeroes of a
list
Output:
Q6) WAP that uses a function to count the no of words in
a string
Output:
Q7) WAP to write, read and search some particular
employee information in binary file (perform the
functions in id field of [Link])
Output:
Q8) WAP to count the no of times the word “is” is
entered in the list/text file.
Output:
Q9) WAP to read and write student information in
[Link] file
Output:
Q10) WAP to count the no of vowels present in a text file
Output:
Q11) WAP to create a random number generator that
generates a random number between 1 and 6
Output:
Q12) WAP that uses a function to find the no of odd or
even nos in a tuple
Output:
Q13) WAP that uses a function to print the prime nos up
to a given no is passed as a parameter to the function
Output:
Q14) WAP to count the total no of words in a text file
Output:
Q15) WAP to update the no of student by using the roll
no in a binary file
Output:
Q16) WAP to delete a record from a binary file
Output:
Q17) WAP to display and write information of employee
in [Link] file
Output:
Q18) WAP to use stack implementation with the help of a
dictionary
Output:
Q19) WAP for stack implementation using list(only
involving even nos.)
Output:
Q20) WAP for stack implementation using lists in Python.
Output:
Q21) WAP to show the SQL connectivity with Python
Output:
Q22) WAP to show the SQL connectivity with Python by
searching a record in a table
Output:
Q22) WAP to show SQL connectivity with Python by
selecting and counting the no of records in a table
Output:
Q23) WAP to show the SQL connectivity with Python by
deleting the records from a table
Output:
Q24) WAP to insert data in a table in MySQL with the
name “Library”
Output:
Q25) Write SQL queries for data manipulation in a table
with the name “Library”