LAB MANUAL QUESTIONS YEAR 2025-2026
Class-XI
Subject- Computer Science (083)
Part-I
Important Instructions: -
✓ One page contains only one question & output must be attached with every question.
✓ These questions must be attached with in Lab Manual.
✓ Students please draw the flowchart wherever is possible for the program.
1) Write a program that swaps the values of variables a and b. You are not allowed to use a third
variable. You are not allowed to perform arithmetic on a and b.
2) Find all occurrence of ‘T’ in the string. ‘The Terrible Tiger Tore The Towel. Replace all
occurrences of ‘T’ with ‘t’.
3) Given the length and breadth of a rectangle. Write a program to find whether the area of
rectangle is greater than its parameter. For example, the area of the triangle with length=5 and
breadth =4 is greater than its parameter.
4) If the three sides of a triangle are entered through the keyboard. Write a program to check
whether the triangle is isosceles, equilateral, scalene or right-angled triangle.
5) Write a program to print first 25 odd numbers using range ().
6) Write a program to print out all Armstrong numbers between 1 and 500 if sum of cubes of each
digits of the number is equal to the number itself then the number is called Armstrong. Ex.153=
(1*1*1) +(5*5-*5) +(3*3*3)
7) Perform the operations on a list of numbers
▪ Create a list of 5 odd numbers.
▪ Create a list of 5 even numbers.
▪ Combine the two list.
▪ Add prime numbers 11,17,29 at the beginning of the combined list.
▪ Report how many elements present in the list.
▪ Replace last 3 numbers in the list with 100,200,300.
▪ Delete all the numbers in the list.
▪ Delete the list.
8) Write to implement stack data structure. Stack in al last in first out (LIFO) list in which
addition and deletion takes place at the same end.
9) Given the following tuple-
(‘F’,’I’,’a’,’b’,’e’,’r’,’g’,’a’,’s’,’t’,’e’,’d’)
write a python code to carry out the following operations:
▪ Add an ‘!’ at the end of the tuple.
▪ Convert a tuple to string.
▪ Extract (‘b’,’b’) from the tuple.
▪ Find out number of occurrences of ‘e’ in the tuple.
▪ Convert the tuple to a list.
▪ Delete characters ‘b’,’b’,’e’,’r’ from the tuple.
10) Create a dictionary of 10 usernames and passwords. Receive the username and password
from keyboard and search for them in the dictionary. Print appropriate message on the screen
based on whether a match is found or not.
11) Write a program that defines a function isPalindrome() which cheeks whether a given string
is palindrome or not. Ignore spaces and cases mismatches while checking of palindrome.
12) Write a program that defines a function count_alphabets_digits () that accepts a string and
calculates the number of alphabets and digits and it should return these values as a dictionary call
this function for some sample string.