Asss
Asss
Asss
General Instructions:
1. This question paper contains two parts A and B. Each part is compulsory.
2. Both Part A and Part B have choices.
3. Part-A has 2 sections:
a. Section – I is short answer questions, to be answered in one word or one line.
b. Section – II has two case studies questions. Each case study has 4 case-based sub-
parts. An examinee is to attempt any 4 out of the 5 subparts.
4. Part - B is Descriptive Paper.
5. Part- B has three sections
a. Section-I is short answer questions of 2 marks each in which two question have
internal options.
b. Section-II is long answer questions of 3 marks each in which two questions have internal
options.
c. Section-III is very long answer questions of 5 marks each in which one question has
internal option.
6. All programming questions are to be answered using Python Language only
2 Given the lists L=[“H”, “T”, “W”, “P”, “N”] , write the output of print(L[1:4]) 1
3 Which module is required to work with CSV files in Python? 1
7 A List is declared as 1
L = [2,5,6,9,8]
What will be the value of len(L)?
18 In SQL, write the query to display the structure of tables stored in a database. 1
20 Which of the following types of table constraints will prevent the printing 1
of duplicate values after the Select statement fetches data from table?
a) Unique
b) Distinct
c) Primary Key
d) NULL
MedicineNo - numeric
MedicineName – character of size 25
MedCode – numeric
Quantity – numeric
Table : medicalstore
MedicineNo MedicineName MedCode Quantity
5647 Saridon 141 75
5741 Paracetamol 142 44
3546 Nicip Plus 141 60
9541 Disprin 140 53
2025 Diclofenac 143 73
2783 Corex Syrup 141 97
8614 Psorid 142 48
(a) Identify the attribute best suitable to be declared as a primary key, 1
(b) Write the degree and cardinality of the table medicalstore. 1
(c) Insert the following data into the attributes respectively in the given 1
table medicalstore.
MedicineNo = 6647, MedicineName = “Dapsone”, MedCode = 141 and
Quantity = 55
(d) Sahil want to remove the table medicalstore from the database 1
rajshree. Which command will he use from the following:
a) DELETE FROM rajshree;
b) DROP TABLE medicalstore;
c) DROP DATABASE medicalstore;
d) DELETE medicalstore FROM rajshree;
(e) Now Sahil wants to know the Primary key of the table along with data 1
types of all the columns. Which query should he write?
import # Line 1
import random
x=3
N = random, randint (1, x)
for i in range (N):
print(i, ‘#’, i + i)
a. What is the minimum and maximum number of times the loop will execute?
b. Find out, which line of output(s) out of (i) to (iv) will not be expected from
the program?
i. 0#1
ii. 1#2
iii. 2#3
iv. 3#4
31 2
Differentiate between DELETE and DROP commands in SQL?
32 Write the full forms of DDL and DML. Write any two commands of DDL in 2
SQL.
33 Find and write the output of the following Python code: 2
def myfun():
n = 50
i=5
s=0
while i<n:
s+ = i
i+ = 10
print(“sum”, s)
myfun()
Section- II
34 Rewrite the following while loop into for loop and also tell its output: 3
i = 10
while i<250:
print(i)
i = i+50
35 Write a function in Python that counts the number of “the” or “this” words 3
present in a text file “myfile.txt”.
Example: If the “myfile.txt” contents are as follows:
This is my first class on Computer Science. File handling is the easiest topic for
me and Computer Networking is the most interesting one.
The output of the function should be: Count of the/this in file: 3
OR
Write a function countVowels() in Python, which should read each character of a
text file “myfile.txt”, count the number of vowels and display the count.
Example: If the “myfile.txt” contents are as follows:
This is my first class on Computer Science.
The output of the function should be: Count of vowels in file: 10
36 Write the outputs of the SQL queries (i) to (iii) based on the given tables: 3
Watches
Watchid Watch_name Price Type Qty_store
W001 High Time 10000 Ladies 100
W002 Life Time 15000 Gents 150
W003 Wave 12500 Ladies 200
W004 High Fashion 13500 Ladies 135
W005 Golden Time 14000 Unisex 150
Sale
Watchid Qty_sold Quarter
W001 10 1
W002 8 2
W003 15 1
W001 12 3
W003 11 2
W004 9 1
W002 15 1
a. Suggest the authorities, the cable layout amongst various blocks inside
university campus for connecting the blocks
b. Suggest the most suitable place (i.e. block) to house the server of this
university with a suitable reason
c. Suggest an efficient device from the following to be installed in each of the
blocks to connect all the computers
d. Suggest the placement of a Repeater (if any) in the network with
justification.
e. Suggest the most suitable (very high speed) service to provide data
connectivity between Admission Office located in Anna Nagar and
Kolkata Admission Office
39 Write the SQL commands for the following queries (a) to (e) on the basis of the 5
following tables SHOP and ACCESSORIES.
Table: SHOP
ID Sname Area
S01 ABC Computronics CP
S02 All Infotech GK II
S03 Tech Shop CP
S04 Geeks Techno Soft Nehru Place
S05 Hitech Tech Store Nehru Place
Table: ACCESSORIES
No Name Price ID
A01 Mother Board 12000 S01
A02 Hard Disk 5000 S01
A03 Keyboard 500 S02
A04 Mouse 300 S01
A05 Mother Board 13000 S02
A06 Keyboard 400 S03
A07 LCD 6000 S04
T08 LCD 5500 S05
T09 Mouse 350 S05
T10 Hard Disk 4500 S03
OR