Class 11 – Computer Science Question Paper with
Answer Key
Maximum Marks: 70 Time: 3 Hours
QUESTION PAPER
SECTION – A (1 mark each)
Q1. Write True or False: Python is a case-sensitive language.
2. The extension of a Python file is: (a) .p (b) .py (c) .pt (d) .pyt
3. Which of the following is a mutable data type in Python? (a) Tuple (b) String (c) List (d)
Integer
4. Which of the following is NOT a keyword in Python? (a) for (b) while (c) switch (d) if
5. Which operator is used for floor division in Python? (a) / (b) // (c) % (d) **
6. In Python, len('Hello') will return: (a) 4 (b) 5 (c) 6 (d) Error
7. Which function is used to convert a string into a list of words? (a) split() (b) join() (c)
append() (d) extend()
8. The output of 2**3 in Python is: (a) 6 (b) 8 (c) 9 (d) 16
9. Which of the following is a membership operator? (a) in (b) is (c) not (d) ==
10. What will be the result of 10 % 3? (a) 3 (b) 1 (c) 0 (d) 10
11. A Python tuple is: (a) Mutable (b) Immutable (c) Changeable (d) Error
12. Which of the following functions finds maximum value from a list? (a) max() (b) sum()
(c) min() (d) len()
13. Which function is used to find the data type of a variable? (a) type() (b) str() (c) id() (d)
isinstance()
14. Which of these is not a logical operator? (a) and (b) or (c) not (d) add
15. Which statement is used to exit from a loop in Python? (a) continue (b) stop (c) break
(d) exit
16. The index of the first element of a list in Python is: (a) 0 (b) 1 (c) -1 (d) None
17. Which of the following is used for comments in Python? (a) // (b) # (c) /* */ (d) !
18. Which built-in function is used to calculate length of a list? (a) size() (b) count() (c) len()
(d) length()
19. What will be the output of print('hello'.upper())? (a) HELLO (b) Hello (c) hello (d) Error
SECTION – B (2 Marks each)
Q20. Assertion–Reason: Assertion (A): Python supports both procedural and
object-oriented programming. Reason (R): Python does not allow defining user-defined
functions.
Q21. Assertion–Reason: Assertion (A): Lists in Python are ordered and mutable. Reason
(R): Once a list is created, it cannot be modified.
Q22. Find the error in the following code:
list1 = [10, 20, 30]
print(list1[3])
Q23. Write any two built-in functions of lists with examples.
Q24. Predict the output:
list1 = [1,2,3,4,5]
print(list1[1:4])
print(len(list1))
SECTION – C (3 Marks each)
Q25. Differentiate between compiler and interpreter.
Q26. Differentiate between list and tuple with suitable examples.
Q27. Explain mutable and immutable datatypes in Python with two examples.
Q28. Define a function. State two advantages of using functions.
Q29. Write a program to search an element in a list.
Q30. Write a program to count occurrences of a number in a list.
Q31. Write a program to find sum, average, minimum and maximum of list elements.
SECTION – D (5 Marks each)
Q32. (2+2) (a) Write a program to swap two numbers using a temporary variable. (b) Write
a short note on dynamic typing in Python.
Q33. (2+2) (a) Write programs for: (i) factorial of a number (ii) Fibonacci sequence till n
terms. (b) Explain the flow of execution in Python programs.
Q34. (2+2) (a) Explain two list functions with examples. (b) Differentiate between append()
and extend().
Q35. (2+2) (a) Write a Python program to find maximum number in a list. (b) Differentiate
between remove() and pop() with examples.
Q36. (2+3) (a) Explain nested lists with an example. (b) Write a program to count
occurrences of an element and replace it with another.
Q37. (2+3) (a) Explain shallow copy and deep copy of lists with examples. (b) Write a
program to calculate sum, average, minimum, maximum of a list.
ANSWER KEY / MARKING SCHEME
SECTION – A
Q1. True
Q2. b) .py
Q3. c) List
Q4. c) switch
Q5. b) //
Q6. b) 5
Q7. a) split()
Q8. b) 8
Q9. a) in
Q10. b) 1
Q11. b) Immutable
Q12. a) max()
Q13. a) type()
Q14. d) add
Q15. c) break
Q16. a) 0
Q17. b) #
Q18. c) len()
Q19. a) HELLO
SECTION – B
Q20. (c) A is True but R is False.
Q21. (c) A is True but R is False.
Q22. Error: Index out of range (list has indices 0,1,2 only).
Q23. Examples: len(list), max(list), min(list), sum(list).
Q24. Output:
[2, 3, 4]
5
SECTION – C
Q25. Compiler translates entire program at once; Interpreter executes line by line.
Q26. List = mutable, Tuple = immutable. Example: list1=[1,2]; tuple1=(1,2).
Q27. Mutable: list, dict; Immutable: string, tuple.
Q28. Function = block of reusable code. Advantages: reusability, readability.
Q29. Example:
x=int(input('Enter:'))
if x in list1: print('Found') else: print('Not found')
Q30. Example:
list1=[1,2,2,3]
print(list1.count(2))
Q31. Example:
list1=[10,20,30]
print(sum(list1), sum(list1)/len(list1), min(list1), max(list1))
SECTION – D
Q32. (a) Swap using temp variable.
x,y=10,20; temp=x; x=y; y=temp
(b) Dynamic typing = variable type decided at runtime.
Q33. (a) Factorial & Fibonacci code.
(b) Flow: sequential unless changed by condition/loop/function.
Q34. (a) list.append(x), list.extend([..]).
(b) append() adds single element, extend() adds multiple.
Q35. (a) max(list) or loop.
(b) remove(val) deletes by value; pop(i) deletes by index.
Q36. (a) Nested list = list within list. Example: [[1,2],[3,4]].
(b) Replace occurrences using loop/replace.
Q37. (a) Shallow copy = references inner lists; deep copy = independent copy.
(b) sum, avg, min, max using functions.