FINAL_CLASS_XI_CS_PRACTICAL_LIST_2024-25[
FINAL_CLASS_XI_CS_PRACTICAL_LIST_2024-25[
2 PORT BLAIR
XI COMPUTER SCIENCE PRACTICAL LIST SESSION 2024-25
I. INPUT /OUTPUT PYTHON FUNDAMENTALS
1
III. ITERATIVE STATEMENTS
IV. STRINGS
1) Write a program for checking whether the given character is uppercase ,lowercase, digit ,special symbol
or white space.
2) Write a program to check whether the given String is a palindrome or not
3) Write a program which replaces all vowels in the string with ’*’
4) Write a program to display the last word of the string accepted from user.
5) Write a program to accept a string and display the string with second alphabet of each word in upper case
V. LIST MANIPULATION
1) Write a program to find Sum and average of all numbers in the list
2) Write a program to find Sum of odd and even numbers in a List
3) Write a program to Count number of positive and negative numbers
4) Write a program to Add 2 to even numbers and subtract 1 from odd numbers
5) Write a program to find the average of the list of the numbers entered through keyboard
6) Write a program to get a list of numbers from the user and Multiply even indexed numbers in a list by 2
7) Write a program to display number of names which starts with letter ‘A’ in the list of names
8) Write a program to display number of 5 lettered city names in the list of city names
2
9) Write a program in python which display only those names from the list which have ‘i’ as second last
character. like L = [“Amit”, “Suman”, “Sumit”, “Montu” , “Anil”]
Output :
Amit
Sumit
10) Write a program in python which swap the alternate members of list (assuming that even number of
elements in the list). like as shown below:
Original List : L = [23, 45, 67, 29, 12, 1]
After Swaping : L = [45,23, 29, 69, 1, 12]
VI. DICTIONARY
1) Create a dictionary ‘ODD’ of odd numbers between 1 and 10, where the key is the decimal number and
the value is the corresponding number in words. Perform the following operations on this dictionary:
(a) Display the keys
(b) Display the values
(c) Display the items
(d) Find the length of the dictionary
(e) Check if 7 is present or not
(f) Check if 2 is present or not
(g) Retrieve the value corresponding to the key 9
(h) Delete the item from the dictionary corresponding to the key 9
2) Write a program to enter names of employees and their salaries as input and store them in a dictionary
3) Write a program to count the number of times a character appears in a given string.
4) Write a function to convert a number entered by the user into its corresponding number in words. For
example, if the input is 876 then the output should be ‘Eight Seven Six’.
5) Write a program to display the name of all the employees whose salary is more than 25000 from the
following dictionary.
emp={1:(“Amit”,25000),2:(“Suman”,30000),3:(“Ravi”,36000)}
Format of data is given below :{Empid : (Empname, EmpSalary)}
VII. TUPLES
1) Write a program to accept a number from the user and store first 10 multiples of number in a tuple for
example :
SAMPLE OUTPUT :
Enter any number : 4
Tuple = (4, 8, 12, 16, 20, 24, 28, 32, 36, 40)
2) Write a program in python to display the sum of all even numbers and odd numbers separately from the tuple
given below :
T1 = (24, 45, 87, 46, 67, 44, 23, 12)
3) Write a program to accept five numbers from the user and store these numbers in a tuple. Display the
following from tuple :
Largest number
Smallest number
Sum of all numbers
Average of all numbers
4) Write a program to find the sum of marks of all students stored in the given tuple.
T1 = ((“Suman”, 75),(“Glory” , 35),(“Ravi”,50))
Expected Output is : 160
5) Write a program to accept roll number from user and display it’s detail from given tuple
Det=((1, ‘Amita’, ‘B’), (2, ‘Sunita’, ‘C’), (3, ‘Daya’, ‘A’))