AmbifulWorksheets
Annual exam practice paper
CBSE · Class 11 · Computer Science (083)

Computer Science: Annual Exam Practice Paper

Time allowed: 3 hours · Maximum marks: 70 · AW-11CS-AP-68083

Name: Date: Score: ____ / 70
  1. This question paper contains 37 questions. All questions are compulsory. Some questions have an internal choice (marked OR): answer only one of them.
  2. The paper is divided into five sections: A, B, C, D and E.
  3. Section A has 21 questions of 1 mark each.
  4. Section B has 7 questions of 2 marks each.
  5. Section C has 3 questions of 3 marks each.
  6. Section D has 4 questions of 4 marks each.
  7. Section E has 2 questions of 5 marks each.
  8. All programming questions are to be answered using Python only.
  9. For a multiple-choice question, write the text of the correct answer as well.
Section A (21 × 1 = 21 marks)
1.
[1]Which of these is an output device?
  1. webcam
  2. microphone
  3. barcode reader
  4. monitor
2.
[1]What does this program print?
print(int('2') + 5)
  1. 7
  2. 7.0
  3. Error
  4. 25
3.
[1]An XOR gate has 6 inputs (its output is 1 when an odd number of inputs are 1). In how many of the 64 rows of its truth table is the output 1?
  1. 31
  2. 6
  3. 33
  4. 32
4.
[1]What does this program print?
s = 'NOTE16'
print(s.isalnum())
  1. Error
  2. True
  3. None
  4. False
5.
[1]Which kind of malware fills the screen with unwanted advertisements?
  1. adware
  2. trojan
  3. worm
  4. spyware
6.
[1]What does this program print?
L = [12, 8, 19, 1, 2, 12]
L.remove(12)
print(L)
  1. [12, 8, 19, 1, 2]
  2. [12, 8, 19, 1, 2, 12]
  3. [8, 19, 1, 2, 12]
  4. None
7.
[1]What is (203)10 in binary?
  1. 11001011
  2. 11001010
  3. 11010011
  4. 11011011
8.
[1]This program should print 1 + 2 + … + 10 = 55, but it prints 45. Which change fixes it?
s = 0
for i in range(1, 10):
    s = s + i
print(s)
  1. change s = 1 to s = 0
  2. change print(s) to print(i)
  3. change s = s + 1 to s = s + i
  4. change range(1, 10) to range(1, 11)
9.
[1]What does this program print?
t = (89)
print(type(t))
  1. <class 'tuple'>
  2. <class 'int'>
  3. <class 'list'>
  4. <class 'str'>
10.
[1]After the statement from math import ceil, which of these runs without an error?
  1. print(ceil[2.8])
  2. print(math.ceil[2.8])
  3. print(math.ceil(2.8))
  4. print(ceil(2.8))
11.
[1]Cache memory sits between:
  1. two computers on a network
  2. the keyboard and the CPU
  3. the hard disk and the printer
  4. the CPU and the main memory (RAM)
12.
[1]To check whether N = 541 is prime, method A divides N by every number from 2 to N − 1, and method B divides only by the numbers from 2 to the whole part of √N. (541 is prime, so neither stops early.) How many divisions does method A make?
  1. 540
  2. 22
  3. 539
  4. 541
13.
[1]Which of these data types is mutable?
  1. str
  2. list
  3. tuple
  4. int
14.
[1]What happens when this program runs?
s = 'book'
s[0] = 'X'
print(s)
  1. it stops with a TypeError, because a string cannot be changed in place
  2. it prints Xook
  3. it prints Xbook
  4. it prints book
15.
[1]A password has 4 characters, each one of the 26 small letters (a–z). How many different passwords are possible?
  1. 390,625
  2. 104
  3. 17,576
  4. 456,976
16.
[1]Which of these makes a separate copy of a list a?
  1. b = a[:]
  2. b is a
  3. b = a
  4. b == a
17.
[1]What does this program print?
c = 0
for i in range(3):
    for j in range(i, 5):
        c = c + 1
print(c)
  1. 15
  2. 11
  3. 13
  4. 12
18.
[1]What does this program print?
d = {'grape': 77, 'peach': 90, 'apple': 63, 'mango': 58}
del d['mango']
print(len(d), 'mango' in d)
  1. 3 True
  2. 4 True
  3. 4 False
  4. 3 False
19.
[1]What does this program print?
import math
print(math.ceil(math.sqrt(37)))
  1. 37
  2. 6
  3. 9
  4. 7
20.
[1]Assertion (A): int('47') + 8 evaluates to '478'.
Reason (R): int() converts a string of digits into an integer, so + adds two numbers.
  1. Both A and R are true, and R is the correct explanation of A.
  2. Both A and R are true, but R is not the correct explanation of A.
  3. A is true, but R is false.
  4. A is false, but R is true.
21.
[1]Assertion (A): Deleting a post from a social media account does not always remove it from the internet.
Reason (R): Copies of data may stay on servers, in backups or in screenshots taken by others.
  1. Both A and R are true, and R is the correct explanation of A.
  2. Both A and R are true, but R is not the correct explanation of A.
  3. A is true, but R is false.
  4. A is false, but R is true.
Section B (7 × 2 = 14 marks)
22.
[2]A logic circuit gives the output X = (A OR B) NAND C. Find X for (i) A = 1, B = 1, C = 1 (ii) A = 0, B = 0, C = 0. Show the working.
OR
[2]Write the truth tables of the AND and the XOR gates, each with two inputs A and B.
23.
[2]Convert (34E)16 to (i) decimal (ii) binary.
24.
[2](i) How many GB are there in 5 TB? (ii) How many bits are there in 8 KB? (Take 1 KB = 1024 bytes.)
OR
[2]Differentiate between RAM and cache memory. Give one example of where each is used.
25.
[2]Predict the output of the following Python code:
word = "d2NLg"
result = []
i = 0
while i < len(word):
    if word[i].isupper():
        result.append(word[i].lower())
    elif word[i].isdigit():
        result.append(int(word[i]) * 3)
    else:
        result.append("#")
    i += 1
print(result)
OR
[2]Predict the output of the following Python code:
title = "Coding Contest"
print(title.replace("t", "#"))
print(title.find("Con"))
26.
[2]Write the output of the following Python statements:
print(type((7)))
print(type(12 // 5))
print(type(5 * 1.5))
print(type((6,)))
27.
[2]Differentiate between an active and a passive digital footprint, with one example of each.
OR
[2]What is identity theft? Suggest one way to stay safe from it.
28.
[2]Mention and briefly explain any two guidelines of netiquette to follow in an online discussion forum.
OR
[2]What is e-waste? Explain any two ‘R’s of e-waste management.
Section C (3 × 3 = 9 marks)
29.
[3]Write a Python program to search for an element key in the list L = [66, 92, 41, 51, 50, 74, 96, 60] by linear search, and print its position (counting from 1) or a message that it is not found. What does it print for key = 66?
OR
[3]Write a Python program that, for the list temps = [40, 98, 46, 65, 62, 37], finds and prints the largest element, the smallest element and the mean of the elements, without using max(), min() or sum(). Write the output too.
30.
[3]Write a Python program that counts how many times each character occurs in the string word = 'programming', using a dictionary, and prints the dictionary. Write its output.
31.
[3]Read the following situations and answer the questions:
(i) Ishaan designs a logo for a new bakery and wants no other business to use it. Which kind of Intellectual Property Right should be obtained?
(ii) Farhan buys a new phone only when the old one can no longer be repaired. Which ‘R’ of e-waste management is this?
(iii) An app collects Tanvi’s location while it runs in the background. What kind of digital footprint is this?
OR
[3]Consider the following digital security scenarios and answer the questions:
(i) A group of people repeatedly post insulting comments and spread rumours about Farhan on a social media platform, to upset Farhan. What type of cyber crime is this?
(ii) Tejas gets an email that looks like it is from a bank, asking for the net-banking password to “keep the account active”. What is this activity called?
(iii) Suggest one communication etiquette that Manav should follow to maintain credibility while taking part in an online discussion forum on science projects.
Section D (4 × 4 = 16 marks)
32.
[4](a) Predict the output of the following code:
s = 'Data and Logic'
t = ''
for w in s.split():
    t = t + w[0]
print(t.upper())
(b) Write a Python program to count the vowels in s, where s = 'Keep Learning'. Write the output it gives.
OR
[4]Predict the output of the following Python code:
s = 'Keep Learning'
print(s[::2])
print(s.lower())
print(s.isalpha())
print(s[::-1])
33.
[4]Write a Python program to find the sum of the series x + 2x + 3x + … + nx, for x = 3 and n = 7. Write the output it gives.
34.
[4]Predict the output of the following Python code:
L = [40, 58, 52, 33, 3, 48, 59]
print(48 in L)
print(len(L))
print(sorted(L))
print(L[2:6])
35.
[4]The dictionary price = {'notebook': 85, 'glue': 140, 'folder': 130, 'scale': 150, 'pencil': 50} holds the price of each item in a stationery shop. Write a Python program that prints each item costing more than ₹90 with its price, and then the total of all the prices. Write the output.
Section E (2 × 5 = 10 marks)
36.
[5](a) Write a Python program to check whether a number n is prime. Write its output for n = 107.
(b) Predict the output of the following code:
for i in range(1, 6):
    for j in range(1, i + 1):
        print(j, end=' ')
    print()
37.
[5]Answer the following questions on safe and responsible use of technology:
(i) Give two features of a strong password.
(ii) What is cyber bullying, and what should a student do about it?
(iii) What is a firewall and why is it used?
(iv) What is the difference between a virus and a worm?
(v) Give one way to recognise a phishing email.
AmbifulWorksheets
Marking scheme
CBSE · Class 11 · Computer Science (083)

Marking scheme

Computer Science: Annual Exam Practice Paper · AW-11CS-AP-68083 · For the parent or teacher: award the marks shown for each step, even when the final answer is wrong.

QAnswer and marks for each stepMarks
Section A (21 × 1 = 21 marks)
1(d) monitor1
2(a) 7
int('…') turns the text into a number
1
3(d) 32
half the rows have an odd number of 1s
1
4(b) True
isalnum() checks every character of 'NOTE16'
1
5(a) adware1
6(c) [8, 19, 1, 2, 12]
remove(12) deletes only the first 12
1
7(a) 11001011
divide by 2 repeatedly and read the remainders from bottom to top
1
8(d) change range(1, 10) to range(1, 11)
range() stops before its end value
1
9(b) <class 'int'>
(89) is just 89 in brackets; a one-item tuple needs a comma: (89,)
1
10(d) print(ceil(2.8))
from math import ceil brings in the name ceil itself, not the name math
1
11(d) the CPU and the main memory (RAM)1
12(c) 539
2 to 540: 539 divisions
1
13(b) list1
14(a) it stops with a TypeError, because a string cannot be changed in place
strings are immutable
1
15(d) 456,976
26 choices for each of 4 places: 26 to the power 4
1
16(a) b = a[:]1
17(d) 12
count the passes of the inner loop for each i
1
18(d) 3 False
del removes the key and its value
1
19(d) 7
√37 is a little more than 6
1
20(d) A is false, but R is true.
A is false: int('47') is the integer 47, so the sum is 55. R is true.
1
21(a) Both A and R are true, and R is the correct explanation of A.
A is true: copies may remain. R is true and explains A.
1
Section B (7 × 2 = 14 marks)
22(i) X = 0 (ii) X = 1
  1. (i) X = 0, gate by gate (1)
  2. (ii) X = 1, gate by gate (1)
2
22 ORA | B | AND | XOR
0 | 0 | 0 | 0
0 | 1 | 0 | 1
1 | 0 | 0 | 1
1 | 1 | 1 | 0
  1. AND: 0, 0, 0, 1 (1)
  2. XOR: 0, 1, 1, 0 (1)
2
23(i) (846)10 (ii) (1101001110)2
  1. (i) 846 (1)
  2. (ii) each hexadecimal digit as four bits: 1101001110 (1)
2
24(i) 5,120 GB (ii) 65,536 bits
  1. (i) 5 × 1024 = 5,120 GB (1)
  2. (ii) 8 × 1024 × 8 = 65,536 bits (1)
2
24 ORcache is a small, very fast memory between the CPU and RAM holding the data used most often; RAM is larger and slower
  1. one correct difference (1)
  2. an example or use of each (1)
2
25['#', 6, 'n', 'l', '#']
  1. Correct output list (2)
2
25 OR
  1. Coding Con#es# (1)
  2. 7 (1)
2
26<class 'int'>
<class 'int'>
<class 'float'>
<class 'tuple'>
  1. type((7)): <class 'int'> (0.5)
  2. type(12 // 5): <class 'int'> (0.5)
  3. type(5 * 1.5): <class 'float'> (0.5)
  4. type((6,)): <class 'tuple'> (0.5)
2
27An active digital footprint is the data a user leaves on purpose, such as posting a photo on social media. A passive digital footprint is the data collected without the user knowingly sharing it, such as a shopping app noting the products looked at.
  1. Active: data left intentionally, e.g. posting a photo on social media (1)
  2. Passive: data collected unknowingly, e.g. a shopping app noting the products looked at (1)
2
27 ORIdentity theft is stealing someone’s personal details, such as Aadhaar or PAN numbers, and using them to pretend to be that person. Do not share personal identity details online, and keep copies of documents safe.
  1. Identity theft: stealing someone’s personal details, such as Aadhaar or PAN numbers, and using them to pretend to be that person (1)
  2. Safety: Do not share personal identity details online, and keep copies of documents safe (1)
2
28
  1. Be credible: check facts before posting, and give the source of what you share (1)
  2. Avoid cyber bullying: never post hurtful comments or spread rumours about anyone (1)
2
28 ORE-waste is discarded electronic and electrical equipment, such as old phones and computers. Reuse: use a device again, or give it to someone who can use it, instead of throwing it away. Reduce: buy electronic goods only when they are really needed.
  1. E-waste: discarded electronic or electrical devices (1)
  2. Reuse: use a device again, or give it to someone who can use it, instead of throwing it away (0.5)
  3. Reduce: buy electronic goods only when they are really needed (0.5)
2
Section C (3 × 3 = 9 marks)
29L = [66, 92, 41, 51, 50, 74, 96, 60]
key = 66
found = False
for i in range(len(L)):
if L[i] == key:
print(key, 'found at position', i + 1)
found = True
break
if not found:
print(key, 'not found')
Output: 66 found at position 1
  1. loop comparing each element with key (1)
  2. position printed (i + 1), with break (1)
  3. not-found message; output: 66 found at position 1 (1)
3
29 ORtemps = [40, 98, 46, 65, 62, 37]
big = temps[0]
small = temps[0]
total = 0
for x in temps:
if x > big:
big = x
if x < small:
small = x
total = total + x
print('Largest:', big)
print('Smallest:', small)
print('Mean:', total / len(temps))
Output:
Largest: 98
Smallest: 37
Mean: 58.0
  1. loop finding the largest and smallest (1)
  2. running total and mean as total / len() (1)
  3. output: Largest: 98; Smallest: 37; Mean: 58.0 (1)
3
30word = 'programming'
freq = {}
for ch in word:
if ch in freq:
freq[ch] = freq[ch] + 1
else:
freq[ch] = 1
print(freq)
Output: {'p': 1, 'r': 2, 'o': 1, 'g': 2, 'a': 1, 'm': 2, 'i': 1, 'n': 1}
  1. empty dictionary and a loop over the string (1)
  2. adding a new key or increasing its count (1)
  3. output: {'p': 1, 'r': 2, 'o': 1, 'g': 2, 'a': 1, 'm': 2, 'i': 1, 'n': 1} (1)
3
31
  1. Trademark (1)
  2. Reduce (1)
  3. Passive digital footprint (1)
3
31 OR
  1. Cyber bullying (1)
  2. Phishing (1)
  3. Be precise: keep posts short and on the topic of the discussion (1)
3
Section D (4 × 4 = 16 marks)
32(a) DAL
(b) s = 'Keep Learning'
v = 0
for ch in s:
if ch in 'aeiouAEIOU':
v = v + 1
print('Vowels:', v)
Output: Vowels: 5
  1. (a) DAL (2)
  2. (b) a loop over the string with the right test (1)
  3. (b) counters printed: Vowels: 5 (1)
4
32 ORKe erig
keep learning
False
gninraeL peeK
  1. s[::2]: Ke erig (1)
  2. s.lower(): keep learning (1)
  3. s.isalpha(): False (1)
  4. s[::-1]: gninraeL peeK (1)
4
33x = 3
n = 7
s = 0
for i in range(1, n + 1):
s = s + i * x
print('Sum =', s)
Output: Sum = 84
  1. initialising the sum (1)
  2. a for loop with the right range (1)
  3. the term added each time (1)
  4. output: Sum = 84 (1)
4
34True
7
[3, 33, 40, 48, 52, 58, 59]
[52, 33, 3, 48]
  1. 48 in L: True (1)
  2. len(L): 7 (1)
  3. sorted(L): [3, 33, 40, 48, 52, 58, 59] (1)
  4. L[2:6]: [52, 33, 3, 48] (1)
4
35price = {'notebook': 85, 'glue': 140, 'folder': 130, 'scale': 150, 'pencil': 50}
total = 0
for item in price:
total = total + price[item]
if price[item] > 90:
print(item, price[item])
print('Total:', total)
Output:
glue 140
folder 130
scale 150
Total: 555
  1. loop over the keys of the dictionary (1)
  2. test price[item] > 90 and print (1)
  3. running total printed at the end (1)
  4. output: glue 140; folder 130; scale 150; Total: 555 (1)
4
Section E (2 × 5 = 10 marks)
36(a) n = 107
is_prime = True
if n < 2:
is_prime = False
for i in range(2, n):
if n % i == 0:
is_prime = False
break
if is_prime:
print(n, 'is a prime number')
else:
print(n, 'is not a prime number')
Output: 107 is a prime number
(b)
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
  1. (a) loop over the possible divisors (1)
  2. (a) test n % i == 0, with break (1)
  3. (a) output: 107 is a prime number (1)
  4. (b) 1 / 1 2 / 1 2 3 / 1 2 3 4 / 1 2 3 4 5 (2)
5
37
  1. At least 8 characters, mixing capital and small letters, digits and symbols; not a name or date (1)
  2. Harassing someone online; do not reply, keep proof, block the sender and tell a parent or teacher (1)
  3. Software or hardware that checks network traffic and blocks unauthorised access (1)
  4. A virus attaches to a file and needs it to run; a worm spreads by itself across a network (1)
  5. It asks for a password, OTP or bank details, often with an urgent tone, an odd sender address or a misspelt link (1)
5