Sample paper · Class 11 · CBSE · Science Computer Science

Computer Science · Sample Paper 4

CBSE board pattern (083), Class 11 syllabus — all 11 chapters, a fresh set of questions. Programming language: Python.

37 questions · 70 marks · 180 minutes

Timed, marked on submit · free with an account

General instructions

  1. This paper has 37 questions in five sections, A to E. All questions are compulsory.
  2. Section A — Q1 to Q21: 1 mark each.
  3. Section B — Q22 to Q28: 2 marks each.
  4. Section C — Q29 to Q31: 3 marks each.
  5. Section D — Q32 to Q35: 4 marks each.
  6. Section E — Q36 and Q37: 5 marks each.
  7. Internal choice is given in Q24, Q29, Q33 and Q36. Answer only one alternative.
  8. All programming questions are to be answered in Python.

Section A · Objective

Questions 1–21 carry 1 mark each.

  1. Question 11 mark

    Which of these is an input device?

    1. A.monitor
    2. B.scanner
    3. C.printer
    4. D.speaker
  2. Question 21 mark

    The smallest unit of data in a computer is a

    1. A.byte
    2. B.bit
    3. C.nibble
    4. D.word
  3. Question 31 mark

    in decimal is

    1. A.5
    2. B.6
    3. C.7
    4. D.8
  4. Question 41 mark

    in hexadecimal is

    1. A.64
    2. B.100
    3. C.A0
    4. D.6E
  5. Question 51 mark

    ISCII is an encoding scheme for

    1. A.Indian scripts
    2. B.Chinese characters
    3. C.emoji
    4. D.binary numbers
  6. Question 61 mark

    Which technology overlays digital information on the real world?

    1. A.augmented reality
    2. B.virtual reality
    3. C.blockchain
    4. D.big data
  7. Question 71 mark

    The process of finding and fixing errors in a program is

    1. A.compiling
    2. B.debugging
    3. C.coding
    4. D.testing only
  8. Question 81 mark

    What is the output of print(2 * 3 + 4)?

    1. A.10
    2. B.14
    3. C.24
    4. D.9
  9. Question 91 mark

    Which function reads input from the user?

    1. A.print()
    2. B.input()
    3. C.read()
    4. D.scan()
  10. Question 101 mark

    What is the result of int('5') + float('2.5')?

    1. A.7.5
    2. B.'52.5'
    3. C.7
    4. D.error
  11. Question 111 mark

    How many times does this loop run?

    for i in range(3, 12, 3):
        print(i)
    
    1. A.3
    2. B.4
    3. C.9
    4. D.12
  12. Question 121 mark

    Which statement exits a loop immediately?

    1. A.continue
    2. B.pass
    3. C.break
    4. D.exit loop
  13. Question 131 mark

    Variables defined inside a function are

    1. A.global
    2. B.local
    3. C.built-in
    4. D.constant
  14. Question 141 mark

    What is 'hello'[1]?

    1. A.'h'
    2. B.'e'
    3. C.'l'
    4. D.'o'
  15. Question 151 mark

    What does 'a,b,c'.split(',') return?

    1. A.['a,b,c']
    2. B.['a', 'b', 'c']
    3. C.('a','b','c')
    4. D.'abc'
  16. Question 161 mark

    What is len([1, [2, 3], 4])?

    1. A.3
    2. B.4
    3. C.5
    4. D.2
  17. Question 171 mark

    L = [4, 2, 7]. What does L.index(7) return?

    1. A.0
    2. B.1
    3. C.2
    4. D.3
  18. Question 181 mark

    Which is immutable?

    1. A.list
    2. B.dictionary
    3. C.tuple
    4. D.set
  19. Question 191 mark

    Unauthorised copying and distribution of software is

    1. A.software piracy
    2. B.open source
    3. C.freeware
    4. D.licensing
  20. Question 201 mark

    Assertion (A): Python is a case-sensitive language.

    Reason (R): In Python, 'Total' and 'total' are treated as different identifiers.

    1. A.Both Assertion (A) and Reason (R) are true, and R is the correct explanation of A.
    2. B.Both Assertion (A) and Reason (R) are true, but R is not the correct explanation of A.
    3. C.Assertion (A) is true, but Reason (R) is false.
    4. D.Assertion (A) is false, but Reason (R) is true.
  21. Question 211 mark

    Assertion (A): Dictionary keys must be unique.

    Reason (R): Assigning a value to an existing key replaces the old value.

    1. A.Both Assertion (A) and Reason (R) are true, and R is the correct explanation of A.
    2. B.Both Assertion (A) and Reason (R) are true, but R is not the correct explanation of A.
    3. C.Assertion (A) is true, but Reason (R) is false.
    4. D.Assertion (A) is false, but Reason (R) is true.

Section B · Very short answer

Questions 22–28 carry 2 marks each.

  1. Question 222 marks

    Differentiate between primary and secondary memory with one example each.

  2. Question 232 marks

    Convert to binary and decimal.

  3. Question 242 marks

    Write the output:

    a = 'Py'
    b = 'thon'
    print(a + b)
    print(a * 3)
    
  4. OR

    Question 242 marks

    What are comments in Python? Show the two ways of writing them.

  5. Question 252 marks

    Write the output:

    for i in range(1, 6):
        if i % 2 == 0:
            continue
        print(i, end=' ')
    
  6. Question 262 marks

    Write the output:

    s = 'Computer Science'
    print(s[:8])
    print(s.lower().count('e'))
    
  7. Question 272 marks

    Write the output:

    L = [10, 20, 30, 40]
    L.remove(20)
    L.append(50)
    print(L, sum(L))
    
  8. Question 282 marks

    What is e-waste? Give two ways to manage it.

Section C · Short answer

Questions 29–31 carry 3 marks each.

  1. Question 293 marks

    Write a Python program to print all numbers between 1 and 100 that are divisible by both 3 and 5.

  2. OR

    Question 293 marks

    Write a Python program to reverse a number entered by the user (e.g. 1234 → 4321).

  3. Question 303 marks

    Write a Python program to count the number of words in a sentence entered by the user.

  4. Question 313 marks

    Write the output:

    d = {'a': 1, 'b': 2, 'c': 3}
    print(list(d.keys()))
    d.pop('b')
    print(d)
    print('c' in d)
    

Section D · Long answer

Questions 32–35 carry 4 marks each.

  1. Question 324 marks

    Write a function gcd(a, b) that returns the greatest common divisor using Euclid's algorithm, and use it to find the LCM of two numbers.

  2. Question 334 marks

    Write a program that reads a list of numbers and creates two lists: one with positive numbers and one with negative numbers.

  3. OR

    Question 334 marks

    Write a program to find the frequency of each element in a list without using a dictionary.

  4. Question 344 marks

    Write a program that stores roll numbers and marks of n students in a dictionary and prints the average marks and the roll numbers of students scoring above average.

  5. Question 354 marks

    What is cyber safety? Explain any three safe practices while browsing the internet.

Section E · Long answer

Questions 36 and 37 carry 5 marks each.

  1. Question 365 marks

    Write a menu-driven program to perform string operations: (1) count vowels, (2) check palindrome, (3) convert to title case, (4) exit.

  2. OR

    Question 365 marks

    Write functions is_prime(n) and print_primes(a, b) that print all prime numbers between a and b. Use them to print primes between 10 and 50.

  3. Question 375 marks

    Explain the functional components of a computer system with a block diagram (described). What is the role of the CPU and its parts?

Ready to attempt this paper?

Take it as a timed test of 180 minutes. Your answers are saved as you go and every answer is marked when you submit.

You'll be asked to log in or sign up first if needed.