XII - CS
XII - CS
XII - CS
General Instructions:
● This question paper contains 37 questions.
● All questions are compulsory.
● The paper is divided into 5 Sections- A, B, C, D and E.
● Section A consists of 21 questions (1 to 21). Each question carries 1 Mark.
● Section B consists of 7 questions (22 to 28). Each question carries 2 Marks.
● Section C consists of 3 questions (29 to 31). Each question carries 3 Marks.
● Section D consists of 4 questions (32 to 35). Each question carries 4 Marks.
● Section E consists of 2 questions (36 to 37). Each question carries 5 Marks.
● All programming questions are to be answered using Python Language only.
● In case of MCQ, text of the correct answer should also be written.
Section – A
A) P * u * V * B) P * R * C) u * A * P* D) P *
25. What will be the output of the following code? 2
def add( ):
c=l
d=1
while(c<9):
c=c+2
d=d*c
print(d,end="$")
return c
print(add( ),end= “*”)
Table: TRANSACT
NO CNO AMOUNT TTYPE TDATE
T1 1002 2000 DEBIT 2021-09-25
T2 1003 1500 CREDIT 2022-01-28
T3 1002 3500 CREDIT 2021-12-31
T4 1001 1000 DEBIT 2022-01-10
(a) Write the SQL statements to delete the records from table TRANSACT
whose amount is less than 1000.
(b) Write a query to display the total AMOUNT of all DEBITs and all
CREDITs.
(c) Write a query to display the NAME and corresponding AMOUNT of all
CUSTOMERs who made a transaction type (TTYPE) of CREDIT.
(d) Write the SQL statement to change the Phone number of customer
whose CNO is 1002 to 9988117700 in the table CUSTOMER.
SECTION – E ( 2x5=10)
36. Deepak is a Python programmer working for election commission, For the 5
upcoming election he has created a binary file “Election.bin”. The structure
of Election.bin is:
[Party_Id, Party_Name, Candidate_Name, TotalVote]
Where Party_Id is Party ID (integer)
Party_name is Party Name (string)
Candidate_Name is name of candidate(string)
TotalVote is total vote received by the candidate
For efficiently maintaining data of the event, Deepak wants to write the
following user defined functions:
(i) accept() – to accept a record from the user and add it to the file
Election.bin
(ii) Search(PartyName) – to display the record for a particular PartyName
and send the appropriate message if such record does not exist.
(iii) update() – To update the Candidate name and Total votes based on the
Party_ID.
As a Python expert, help him complete the task.
37. The government has planned to develop digital awareness in the rural areas 5
of the nation. According to the plan, an initiative is taken to set up Digital
Training Centers in villages across the country with its Head office in the
nearest cities. The committee has hired a networking consultancy to create
a model of the network in which each City Head office is connected to the
Training Centers situated in 3 nearby villages. As a network expert in the
consultancy, you have to suggest the best network-related solutions for the
issues/problems raised in (a) to (e), keeping in mind the distance between
various locations and other given per meters.
(a) It is observed that there is a huge data loss during the process of data
transfer from one village to another. Suggest the most appropriate
networking device, which needs to be placed along the path of the wire
connecting one village with another to refresh the signal and forward it
ahead.
(b) Draw the cable layout (location-to-location) to efficiently connect various
Village Training Centers and the City Head Office for the above shown
layout.
(c) Which hardware networking device, will you suggest to connect all the
computers within the premises of every Village Training Center ?
(d) Which protocol, will be most helpful to conduct online interactions of
Experts from the City Head Office and people at the three Village
Training Centers ?
(e) What type of network (PAN, LAN, MAN, or WAN) will be set up among the
Village Training Centers and the City Head Office.