CS Practical File Class XI
CS Practical File Class XI
Class XI 2024-25
1 Write a python program to input a name and display the welcome message for the
same.
2 Write a python program to input the user's name and age and show the name age
times without the use of any loop.
3 Write a python program to input three numbers and display the largest and the
smallest number.
a. 1 * * * b. 21
* 2 * * 21 31
* * 3 * 21 31 41
* * * 4 21 31 41 51
21 31 41 51 61
c. 1 2 3 4 5 d. A
1 2 3 4 A B
1 2 3 A B C
1 2 A B C D
1 A B C D E
1 2
1 2 3
1 2 3 4
1 2 3 4 5
5 Write a program to input the value of x and n and print the sum of the following
series:
1) 1 + x² + x³ + … + xⁿ
7 Write a program to input a number and print its binary, octal and hexadecimal
equivalents. (Built-in conversion functions may be used)
8 Write a program to input a number and check if the number is a prime or a composite
number.
10 Write a python program to compute the greatest common divisor and least common
multiple of two given integers.
11 Write a program to generate an OTP having six digits. The digits have to be
generated individually.
1. Addition
2. Subtraction
3. Multiplication
4. Division
Percentage Grade
>= 90 A
>= 70 and < 90 B
>= 50 and < 70 C
>= 40 and < 50 D
<40 E
>=500000 20%
400000 to 499999 15%
300000 to 399999 10%
<300000 5%
15 Write a program to accept the age of ‘n’ employees and count the number of people in the
following age group:
i) 26 – 35
ii) 36 – 45
iii) 46 – 55
16 Write a program that reads a string from the user and checks whether it is
palindrome or not.
18 Input a string and convert the case of characters in a string i.e. uppercase should
become a lowercase character and vice-versa.
19 Write a program to find the number of times an element occurs in the list.
20 Write a program to find the largest and smallest element in a given list of numbers.
21 Write a program to read a list of ‘n’ integers between 1 and 100. Create 2 new lists,
one having numbers between 1 and 50 and other having numbers between 51 and
100. Print all the 3 lists.
22 Write a program to read a list of ‘n’ elements. Modify this list so that it does not
contain any duplicate elements i.e. all elements occurring multiple times in the list
should appear only once.
23 Write a program to input a list of elements and search for a particular element in the
list.
24 Write a program to accept a string into a tuple and extract the digits into a new list.
Print the extracted numeric list.
25 Write a program to input a list and swap elements at the even location with the
elements at the odd location.
26 Write a program to create a dictionary with the roll number, name and marks of n
students in a class and display the names of students who have marks above 75.
1. Show record
2. Add new customer
3. Delete a customer
4. Search record
5. Update record
6. Sort record
7. Exit
28 Write a program to input your friends’ names and their phone numbers and store
them in a dictionary as the key-value pair. Perform the following operations on the
dictionary:
i) Display the name and phone number for all your friends.
ii) Add a new key-value pair in this dictionary and display the modified dictionary.
iii) Delete a particular friend from the dictionary.
iv) Modify the phone number of an existing friend.
v) Check if a friend is present in the dictionary or not.
vi) Display the dictionary in sorted order of names.