Professional Documents
Culture Documents
CLASS XI (TERM-2)
COMPUTER SCIENCE BOARD PRACTICAL FILE
Submission Deadline: 31ST JANUARY, 2022
If you submit any time after the deadline, you will not receive full credit points
1. Write a python program that inputs a list of numbers and shifts all the zero’s to
right and all non-zero numbers to left of the list.
Example:
Enter a list
[6,8,-5,0,4,0,-2]
The result is
[6,8,-5,4,-2,0,0]
Example:
Enter first list
[9,5,6,9,2]
Enter second list
[8,5,2,9]
The list having max no. of elements is [9,5,6,9,2]
The union is
[2,5,6,8,9]
4. Find the sum of each row of matrix of size m x n. For example for the following matrix
output will be like this :
Sum of row 1 = 32
Sum of row 2 = 31
Sum of row 3 = 63
7. WAP to input a list of numbers and print those numbers which are coming consecutively 3
times.
Example:
Input a list
[2,3,4,5,5,5,6,7]
The number coming consecutively 3 times is 5
8. Given a string and a number N, we need to mirror the characters from the N-th position
up to the length of the string in alphabetical order. In mirror operation, we change ‘a’ to
‘z’, ‘b’ to ‘y’, and so on.
Examples:
Input : N = 3
paradox
Output : paizwlc
We mirror characters from position 3 to end.
Input : N = 6
pneumonia
Output : pneumlmrz
9. WAP to input phone id and username in the form of a dictionary and display those ids
which start with 91.
Example:
Suppose the dictionary contains the data as follows
{9123:”Raj”,9234:”Rahul”,9189:”Preeti”}
So the ouput would be
[9123,9189]
• Paste the screen shot of the program and output in the word file and
make a pdf file from it.