0% found this document useful (0 votes)
10 views

DAV_CS_ANNUAL_21_22Ms

This document is an examination paper for Computer Science for Class XI at D.A.V. Group of Schools, detailing the structure of the exam, including sections A, B, and C with varying marks for each question. It includes questions on programming, data structures, cookies, spyware, and logic expressions, along with specific programming tasks in Python. The paper is designed to assess students' understanding of computer science concepts and their practical application.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

DAV_CS_ANNUAL_21_22Ms

This document is an examination paper for Computer Science for Class XI at D.A.V. Group of Schools, detailing the structure of the exam, including sections A, B, and C with varying marks for each question. It includes questions on programming, data structures, cookies, spyware, and logic expressions, along with specific programming tasks in Python. The paper is designed to assess students' understanding of computer science concepts and their practical application.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

: PAGE 1 :

D.A.V.GROUP OF SCHOOLS , CHENNAI & RANIPET.


ANNUAL EXAMINATION – 2021-2022
COMPUTER SCIENCE(083)

Class : XI Time :
2Hrs
Date : 08-03-22 Max. : 35
Marks

General Instructions
 The question paper is divided into 3 sections – A, B and C
 Section A, consists of 7 questions (1-7). Each question carries 2 marks.
 Section B, consists of 3 questions (8-10). Each question carries 3 marks.
 Section C, consists of 3 questions (11-13). Each question carries 4 marks.
 Internal choices have been given for question numbers 7, 8 and 12.

SECTION – A

1.
i.
Which is NOT the possible output of following program from given options:

import random
instr = ['Guitar', 'Keyboard', 'Piano', 'Violin','Veena']
X=random.randint(0,3)
for i in range(X):
print(instr[i+1],'*',end=" ")

(A) Keyboard * Piano * Violin * (B) Keyboard *


(C)Guitar * Keyboard * (D) No output(A,B ) NOT POSSIBLE

ii. Differentiate between random() and randrange() with eg.


Ans :ANY valid definition OR eg 1

2.i)
49,[4, -5, 32, 56, -9, 38, 9, -7, 11, -7, 19, 2] 1 each line

16.333333333333332 11.916666666666666

3. identify Errors in the following code ,rewrite the corrected code.Underlining the
corrections made.
dic={} ½ *4
x=dict{}
x[1]='annual'
x[2]='exam'
x[1.0]='xic'
dic[(-1,2,3)]='Aa'
dic[(4,-3,1)]='Bb'
dic[(5,4,-6)]='Cc'
dic[(1,2,3)]='ABC'
dic[['X']]=x
x.fromkeys([1,8],4)
print(dic, dic.len(dic))
x.setdefault((10,6))
print(x, dict.fromkeys((3,4,5),(4,2,1)))
: PAGE 2 :

4. i. Verify the Boolean Expression using Truth Table(Valid / InValid)


valid – ½ + ½
ii. Draw a logic diagram for the following expression:
AB+B’C+C’A’

5. What are cookies? elaborate on the types of cookies?(1+1)


Ans : Definition of cookies-text files with small pieces of data — like a
username and password — that are used to identify your computer as you
use a computer network.
Types :first party and second party and other valid type with a line
explanation.

6. Differentiate between Spyware and Adware .(1 MARK EACH)

Spyware is malicious software code that runs secretly on a computer, gathers


information about the user and their browsing habits, and then transmits that
information back to a remote entity. Rather than disrupting a device's
operations, spyware targets sensitive information and can grant remote access
to hackers.

The purpose of spyware is to collect information about a person or organization


without their knowledge and transmit that information to another entity for
financial gain. That is why spyware is often used to steal financial or personal
information. One specific type of spyware is a keylogger, which records the
user's keystrokes to reveal passwords and other personal information.

7. i. Write the differences between append() method and extend() method with suitable
example.
Ans:: The key difference between append and extend in Python is that,
append adds its arguments as a single element to the end of the list while the
extend iterates over its arguments by adding each element to the list and
extending it.
Valid example.(1/2 EACH)
OR
ii. Illustrate with suitable example of keys() ,fromkeys() and setdefault() methods
used in dictionary .
ans:
The setdefault() method returns the value of a key (if the key is in dictionary).
If not, it inserts key with a value to the dictionary.

The syntax of setdefault() is:


dict.setdefault(key[, default_value])

The keys() method returns a view object that displays a list of all the keys in
the dictionary

The syntax of keys() is:


: PAGE 3 :
dict.keys()

The fromkeys() method creates a new dictionary from the given sequence of
elements with a value provided by the user.

The syntax of fromkeys() method is:

dictionary.fromkeys(sequence[, value])
any two correct answer:

SECTION B

8. i. Give 3 example situations that will be considered as “Plagiarism”(I MARK EACH)

The practice of taking someone else's work or ideas and passing them off as
one's own.
"there were accusations of plagiarism" infringement of copyright ·
OR
II. Name any 2 software features / voice assistants that visually impaired students can
use.

AccessNote is a sophisticated note-taking app designed to support visually


impaired students and working professionals. AccessNote is compatible with
VoiceOver. Availability: iOS Aipoly Vision or valid any software.

9. Write a python program to input n numbers in a list , data to be deleted .The program
should delete all the occurrences of the data from the given list without using
parallel ,built in methods.

ANS: input,data search,loop for traversing ,shifting left if found, updating


pos ,print msg if not found (½ each)
(sample deletion prg without function/parallel
data=int(input("Enter element to be deleted:"))
print("list is:")
print(l)
i=0
n=len(l)
while i<=n-1:
if l[i]==data:
pos=i
c+=1
while pos<=n-2:#shifting left if data found
l[pos]=l[pos+1]
pos+=1
i-=1# to check adjacent duplicate
n=n-1#updates n after deleting

i+=1
print("New list is:")
for i in range(n):
print(l[i])

Or valid method using Slicing

10. Write a python program to create a dictionary of n items with item number ,name
and price.
(item number as key and name and price as values in a tuple) Display the details of
the items with price >8500 and also the sum of all item prices.

Declaration ,input, loop to traverse,conditional check ,accumulate sum,print


sum and details.
(1/2 mark each)

SECTION C
11. i. Write a program to read n number of countries and store them in a list .Sort the
: PAGE 4 :
elements in descending order implementing Bubble sort technique also print the
sorted list,

Ans : input countries,Nested loop ,descend, condtional check ,swap position,print


½*6

ii. Using Dictionary Comprehension write a statement to print the cube of first 5
multiple of 3 .

d={3:27,6:216,9:729,12:1728,15:3375}

s_dict = {num: num*num*num for num in range(3,3*6,3)} - 1


print(s_dict) OPTIONAL

12.i) Write a Python code to create a dictionary of ‘n’ movies (mov_Id as the key and
value to be a nested dictionary having title, director, cost) and do the following:(3)
a) display all movie titles directed by Mani Rathnam.
b) read a title and director. Search through the dictionary and if found , display the
the details

a) declaration,input n movies ,loop to traverse and check display ½


EACH
b) input /get values to search, loop to traverse, and to update status
and display
½ EACH

ii) Explain the get() method with a valid example. (1)


syntax and valid eg ½+ ½
(OR)

Write a python code to read details of ‘n’ salesmen as a nested dictionary, Sales
where the key is the id of the salesman and the value has name of month and the
sales amount, as shown in the sample. The program should display the id of the
salesman who has scored the highest sales in the month of DECEM.
(eg) If the input is:
SALES= { 1: {“JAN” : 10290, “JUL”:31410,
DECEM”:44330},
2: {“JAN” : 4950, “JUL”: 460, “DECEM”:46345 },
3: {“JAN” : 3099, “JUL”: 4420, “DECEM”:89205 } }
Output should be ID:3,89205.

Input,
nested loop,
To check the highest
Display the appropriate value EACH ONE MARK

13 I.Find the Boolean algebra expression for the following system. (2)
: PAGE 5 :

Ans : Q=ABC +A.(B’+C’)

II.Write a program to input a matrix of m*n and print the row and column sum for the
matrix elements. (2)
INPUT
LOOP TO TRAVERSE
SUM ACCUMULATE
ROW AND COLUMN

½ EACH

############

You might also like