Computer Science Question Paper
Class: XI (Introduction to Problem Solving, List Manipulation)
Full Marks: 50
Time: 1 hour 15 minutes
1. What are conditionals? When are they required in a program? [2]
2. Give an example of a loop that is to be executed a certain number of times. [3]
3. Write the pseudocode to print all multiples of 5 between 10 and 25 (including 10 and 25). [4]
4. Write a pseudocode to get a number and check if it is prime. [4]
5. Draw a flowchart to print even numbers between 1 and 50. [4]
6. Discuss two common tools for developing an algorithm. [1]
7. What is a dry run? [1]
8. Write pseudocode that lets the user type words, and when they press ‘x’, it prints how many
words the user inputted and then quits the program. [4]
9. Write a program to create a copy of a list. In the copy, add 10 to its first and last elements.
Then display both the original and modified lists. [4]
10. What does a * b amount to if a and b are lists? [1]
11. What is the difference between the pop() and remove() methods of a list? [1]
12. Write a program that inputs a list, replicates it twice, and then prints the sorted list in
ascending and descending orders. [4]
13. Predict the output: [4]
List1 = [13, 18, 11, 16, 13, 18, 13]
print(List1.index(18))
print(List1.count(18))
List1.append(List1.count(13))
print(List1)
14. Using slicing, retrieve [12, 25.7, [2, 1, 0, 5]] from the list L1. What is the slice
notation? [2]
L1 = [3, 4.5, 12, 25.7, [2, 1, 0, 5], 88]
15. Does the slice operator ([:]) always produce a new list? Explain. [2]
16. If lst = [1, 3, 5], what is the difference between lst * 3 and lst *= 3? [3]
17. What are the sort() and sorted() functions? Explain with examples. [2]
18. Write a program that reverses a list of integers. [2]
19. Differentiate between the append() and extend() methods of a list. [2]
……………………………………………