LIST OF PRACTICALS
YEAR 12
COMPUTER SCIENCE
2025-2026
Date: 11.03.2025
1. Write a program that asks the user to input number of seconds and then expresses it in terms of
minutes and seconds it contains.
2. Write a program that repeatedly asks from users some numbers until string “done” is typed. The
program should print the sum of all numbers entered.
3. Write a program to print a multiplication table as shown below:
1 2 3 4 5 6 7 8 9
2 4 6 8 10 12 14 16 18
3 6 9 12 15 18 21 24 27
4 8 12 16 20 24 28 32 36
5 10 15 20 25 30 35 40 45
6 12 18 24 30 36 42 48 54
7 14 21 28 35 42 49 56 63
8 16 24 32 40 48 56 64 72
9 18 27 36 45 54 63 72 81
Date: 12.03.2025
1. Write a Python program to find and display the prime numbers between 2 to N, where N is user
input
2. Write a program to add all those values in the list of SCORES, which are ending with zero(0) and
display the sum.
3. Determine whether a number is a perfect number, an armstrong number or a palindrome
4. Write a program to input the value of x and n and print the sum of the following series:
● 1+x+x2+x3+x4+ ............xn
● 1-x+x2-x3+x4+ ......... xn
●
You may make it a menu driven program, if you wish.
5. Input a number and check if the number is a prime or composite number.
6. Display the terms of a Fibonacci series.
7. Count and display the number of vowels, consonants, uppercase, lowercase characters in string.
8. Input a string and determine whether it is a palindrome or not; convert the case of characters in
a string.
9. Find the largest/smallest number in a list/tuple.
10. Input a list of numbers and swap elements at the even location with the elements at the odd
location.
11. Input a list/tuple of elements, search for a given element in the list/tuple.
12. Input a list of numbers and test if a number is equal to the sum of the cubes of its digits. Find the
smallest and largest such number from the given list of numbers.
13. Create a dictionary with the roll number, name and marks of n students in a class and display
the names of students who have scored marks above 75.
Menu Driven Programs:
1. Student Management System (Using Dictionary)
Create a system where students’ information (roll number, name, and marks) is stored, displayed,
and searched efficiently.
✅
Concepts to be Used:
✅
Dictionaries (to store student details)
✅
Loops (for menu-driven execution)
✅
Conditional Statements (to validate choices)
Functions (to modularize tasks)
Program Flow:
Add Student: Takes roll number, name, and marks and stores them in a dictionary.
Display Students: Iterates over the dictionary and prints all student records.
Search Student: Accepts a roll number and retrieves the corresponding student’s details.
Sample Output :
2. Shopping Cart System (Using Dictionary & Lists)
Create a Shopping cart System that allow users to add items to a shopping cart, view the cart, and
calculate the total bill.
Concepts Used:
✅
✅
Dictionary (to store items and their prices)
✅
Lists (for handling multiple entries)
✅
Loops (for repeated actions)
Conditional Statements (to validate input and check if cart is empty)
Program Flow:
Add Item: Takes item name, price, and quantity and stores it in a dictionary.
Display Cart: Prints all items along with their quantity and price.
Calculate Total Bill: Computes the total bill by summing up the product of price and quantity of
all items.
Expected Output:
3. Library Management System (Using List & Dictionary)
Create a system that allows adding books, displaying available books, and searching for a book by title.
✅
Concepts to be Used:
✅
List of dictionaries (to store book details)
✅
Loops (to navigate menu)
Conditional Statements (to check if a book exists)
Program Flow:
Add Book: Takes book ID, title, and author and stores them in a list of dictionaries.
Display Books: Iterates over the list and prints all books.
Search Book: Accepts a title and searches for the book in the list.
4. Bank Account System (Using Dictionary)
Write a Python program to simulate basic banking functions like creating accounts, deposits,
withdrawals, and checking balances.
Concepts to be Used:
✅
✅
Dictionary (to store account details)
✅
Loops (for menu-driven interface)
Conditional Statements (to validate transactions)
Program Flow:
Create Account: Stores account number, name, and initial balance in a dictionary.
Deposit: Accepts an amount and adds it to the balance.
Withdraw: Checks if the balance is sufficient before withdrawing.
Check Balance: Displays the current balance of an account.