Class 12 CS 083 Previous Year Question Paper 2020 – Compartment

Series HMJ/C
Question Paper Code 91/C Set 4

COMPUTER SCIENCE (NEW) – COMPARTMENT
(Session 2019-20)

Time allowed : 3 hours
Maximum Marks : 70

General Instructions :

  1. All questions are compulsory.
  2. Question paper is divided into four sections – A, B, C and D.
    • Section A : Unit-1 – 30 Marks
    • Section B : Unit-2 – 15 Marks
    • Section C : Unit-3 – 15 Marks
    • Section D : Unit-4 – 10 Marks

SECTION A

1. (a) Which of the following is not a valid variable name in Python ? Justify reason for it not being a valid name.
(i) 5Radius
(ii) Radius_
(iii) _Radius
(iv) Radius

(b) Which of the following are keywords in Python ?
(i) break
(ii) check
(iii) range
(iv) while

(c) Name the Python Library modules which need to be imported to invoke the following functions :
(i) cos()
(ii) randint()

(d) Rewrite the following code in Python after removing all syntax error(s). Underline each correction done in the code.
input('Enter a word',W)
if W = 'Hello'
print('Ok')
else:
print('Not Ok')

(e) Find and write the output of the following Python code :
def ChangeVal(M,N):
for i in range(N):
if M[i]%5 == 0:
M[i] //= 5
if M[i]%3 == 0:
M[i] //= 3
L=[25,8,75,12]
ChangeVal(L,4)
for i in L :
print(i, end='#')

(f) Find and write the output of the following Python code :
def Call(P=40,Q=20):
P=P+Q
Q=P–Q
print(P,'@',Q)
return P
R=200
S=100
R=Call(R,S)
print (R,'@',S)
S=Call(S)
print(R,'@',S)

(g) What possible output(s) are expected to be displayed on screen at the time of execution of the program from the following code ? Also specify the minimum and maximum values that can be assigned to the variable End.
Class 12 CS 083 Previous Year Question Paper 2020 - Compartment Q.1g

2. (a) Write the names of the immutable data objects from the following :
(i) List
(ii) Tuple
(iii) String
(iv) Dictionary

(b) Write a Python statement to declare a Dictionary named ClassRoll with Keys as 1, 2, 3 and corresponding values as ‘Reena‘, ‘Rakesh‘, ‘Zareen‘ respectively.

(c) Which of the options out of (i) to (iv) is the correct data type for the variable Vowels as defined in the following Python statement ?
Vowels = ('A', 'E', 'I', 'O', 'U')
(i) List
(ii) Dictionary
(iii) Tuple
(iv) Array

(d) Write the output of the following Python code :
for i in range(2,7,2):
print(i * '$')

(e) Write the output of the following Python code :
def Update(X=10):
X += 15
print('X = ', X)
X=20
Update()
print('X = ', X)

(f) Differentiate between ‘‘w’’ and ‘‘r’’ file modes used in Python. Illustrate the difference using suitable examples.

(g) A pie chart is to be drawn (using pyplot) to represent Pollution Level of Cities. Write appropriate statements in Python to provide labels for the pie slices as the names of the Cities and the size of each pie slice representing the corresponding Pollution of the Cities as per the following table :
Class 12 CS 083 Previous Year Question Paper 2020 - Compartment Q.2g

OR

Write the output from the given Python code :
import matplotlib.pyplot as plt
Months = ['Dec','Jan','Feb','Mar']
Marks = [70, 90, 75, 95]
plt.bar(Months, Attendance)
plt.show()

(h) Write a function Show_words() in Python to read the content of a text file ‘NOTES.TXT’ and display the entire content in capital letters. Example, if the file contains :
"This is a test file"
Then the function should display the output as :
THIS IS A TEST FILE

OR

Write a function Show_words() in Python to read the content of a text file 'NOTES.TXT' and display only such lines of the file which have exactly 5 words in them. Example, if the file contains :
This is a sample file.
The file contains many sentences.
But needs only sentences which have only 5 words.

Then the function should display the output as :
This is a sample file.
The file contains many sentences :

(i) Write a Recursive function in Python RecsumNat(N), to return the sum of the first N natural numbers. For example, if N is 10 then the function should return (1 + 2 + 3 + … + 10 = 55).

OR

Write a Recursive function in Python Power(X,N), to return the result of X raised to the power N where X and N are non-negative integers. For example, if X is 5 and N is 3 then the function should return the result of (5)3 i.e. 125.

(j) Write functions in Python for PushS(List) and for PopS(List) for performing Push and Pop operations with a stack of List containing integers.

OR

Write functions in Python for InsertQ(Names) and for RemoveQ(Names) for performing insertion and removal operations with a queue of List which contains names of students.

SECTION B

3. Fill in the blanks from questions 3(a) to 3(d).

(a) Computers connected by a network across different cities is an example of ____.

(b) ____ is a network tool used to test the download and upload broadband speed.

(c) A ____ is a networking device that connects computers in a network by using packet switching to receive, and forward data to the destination.

(d) is a network tool used to determine the path packets taken from one IP address to another.

(e) Write the full form of the following abbreviations :
(i) POP
(ii) VoIP
(iii) NFC
(iv) FTP

(f) Match the ServiceNames listed in the first column of the following table with their corresponding features listed in the second column of the table :
Class 12 CS 083 Previous Year Question Paper 2020 - Compartment Q.3f

(g) What is a secure communication ? Differentiate between HTTP and HTTPS.

(h) Helping Hands is an NGO with its head office at Mumbai and branches located at Delhi, Kolkata and Chennai. Their Head Office located at Delhi needs a communication network to be established between the head office and all the branch offices. The NGO has received a grant from the national government for setting up the network. The physical distances between the branch offices and the head office and the number of computers to be installed in each of these branch offices and the head office are given below. You, as a network expert, have to suggest the best possible solutions for the queries as raised by the NGO, as given in (i) to (iv).
Distances between various locations in Kilometres :
Class 12 CS 083 Previous Year Question Paper 2020 - Compartment Q.3h-1
Number of computers installed at various locations are as follows :
Class 12 CS 083 Previous Year Question Paper 2020 - Compartment Q.3h-2
(i) Suggest by drawing the best cable layout for effective network connectivity of all the Branches and the Head Office for communicating data.

(ii) Suggest the most suitable location to install the main server of this NGO to communicate data with all the offices.

(iii) Write the name of the type of network out of the following, which will be formed by connecting all the computer systems across the network :
(A) WAN
(B) MAN
(C) LAN
(D) PAN

(iv) Suggest the most suitable medium for connecting the computers installed across the network out of the following :
(A) Optical fibre
(B) Telephone wires
(C) Radio waves
(D) Ethernet cable

SECTION C

4. (a) Which SQL command is used to add a new attribute in a table ?

(b) Which SQL aggregate function is used to count all records of a table ?

(c) Which clause is used with a SELECT command in SQL to display the records in ascending order of an attribute ?

(d) Write the full form of the following abbreviations :
(i) DDL
(ii) DML

(e) Observe the following tables, EMPLOYEES and DEPARTMENT carefully and answer the questions that follow :
Class 12 CS 083 Previous Year Question Paper 2020 - Compartment Q.4e
(i) What is the Degree of the table EMPLOYEES ? What is the cardinality of the table DEPARTMENT ?
(ii) What is a Primary Key ? Explain.

OR

Differentiate between Selection and Projection operations in context of a Relational Database. Also, illustrate the difference with one supporting example of each.

(f) Write whether the following statements are True or False for the GET and POST methods in Django :
(i) POST requests are never cached.
(ii) GET requests do not remain in the browser history.

(g) Write outputs for SQL queries (i) to (iii), which are based on the following tables, CUSTOMERS and PURCHASES :
Class 12 CS 083 Previous Year Question Paper 2020 - Compartment Q.4g
(i) SELECT COUNT(DISTINCT CITIES) FROM CUSTOMERS;
(ii) SELECT MAX(PUR_DATE) FROM PURCHASES;
(iii) SELECT CNAME, QTY, PUR_DATE FROM CUSTOMERS, PURCHASES WHERE CUSTOMERS.CNO = PURCHASES.CNO AND QTY IN (10,20);

(h) Write SQL queries for (i) to (iv), which are based on the tables : CUSTOMERS and PURCHASES given in the question 4(g) :
(i) To display details of all CUSTOMERS whose CITIES are neither Delhi nor Mumbai.
(ii) To display the CNAME and CITIES of all CUSTOMERS in ascending order of their CNAME.
(iii) To display the number of CUSTOMERS along with their respective CITIES in each of the CITIES.
(iv) To display details of all PURCHASES whose Quantity is more than 15.

SECTION D

5. (a) An organisation purchases new computers every year and dumps the old ones into the local dumping yard. Write the name of the most appropriate category of waste that the organisation is creating every year, out of the following options :
(i) Solid Waste
(ii) Commercial Waste
(iii) E-Waste
(iv) Business Waste

(b) Data which has no restriction of usage and is freely available to everyone under Intellectual Property Rights is categorised as
(i) Open Source
(ii) Open Data
(iii) Open Content
(iv) Open Education

(c) What is a Unique Id ? Write the name of the Unique Identification provided by Government of India for Indian Citizens.

(d) Consider the following scenario and answer the questions which follow :
“A student is expected to write a research paper on a topic. The student had a friend who took a similar class five years ago. The student asks his older friend for a copy of his paper and then takes the paper and submits the entire paper as his own research work.”
(i) Which of the following activities appropriately categorises the act of the writer ?
(A) Plagiarism
(B) Spamming
(C) Virus
(D) Phishing

(ii) Which kind of offense out of the following is made by the student ?
(A) Cyber Crime
(B) Civil Crime
(C) Violation of Intellectual Property Rights

(e) What are Digital Rights ? Write examples for two digital rights applicable to usage of digital technology.

(f) Suggest techniques which can be adopted to impart Computer Education for
(i) Visually impaired students (someone who cannot write).
(ii) Speech impaired students (someone who cannot speak).

Find Class 12 Computer Science Previous Year Question Papers

Find Class 12 Computer Science Previous Year Question Papers Solution

Find Class 12 Computer Science Previous Year Compartment Question Papers

Find Class 12 Computer Science Previous Year Compartment Question Papers Solution