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

SET B

Uploaded by

akilasathish79
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

SET B

Uploaded by

akilasathish79
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

FULL PORTION PRACTICE SET

(2024- 25)
Class : XII Total Mark : 70
Subject : Computer Science Subject Code : 083
Duration
Roll No
: 3 Hrs
: B Date
Invigilator’s Signature
:
:_________

General Instructions:
 Please check this question paper contains 37 questions.
 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.

Q. No Questions Mark
SECTION A
1 State True or False: 1
EOFError, raised when the input() method hits an "end of file" condition
(EOF)
2 Select the correct output of the code : 1
s=“I#N#F#O#R#M#A#T#I#C#S”
L=list(s.split(„#‟))
print(L)
a) [I#N#F#O#R#M#A#T#I#C#S]
b) [„I‟, „N‟, „F‟, „O‟, „R‟, „M‟, „A‟, „T‟, „I‟, „C‟, „S‟]
c) [„I N F O R M A T I C S‟]
d) [„INFORMATICS‟]
3 Which of the following is the correct output for the execution of the 1
following Python statement?
print(5*3**2/2)
(A) 22.5 (B) 22 (C) 9.5 (D) 9
4 What is the output of the following code? 1
magic = "CBSE-Board-Exam"
number = "2024"
print(number.isdigit(),magic.istitle())
a)False True b) False False c) True False d) True True
5 What will be the Output? 1
greeting = "Hello Friends"
print(greeting[:2:] + greeting[:5:] + greeting[6::])
6 Which of the following statement(s) would given an error after executing 1
the following code?
t1=(4, 7, 8, 9) #statement1
t2=(0, 4, 3) #statement2
t=t1+t2 #statement3
print(t) #statement4
print(t.sort()) #statement5
(A) #statement5 (B) #statement4 and #statement5
( C) #statement2 and #statement3 (D) #statement1 and #statement5
7 What will be the output of the following code, when executed? 1
d={'Name': 'Ram','Subjects':['Eng', 'Physics', 'CS'], 'Marks':[67,78,90]}
print(d['Subjects'][2])
8 Given a list Lst= [45,100,20,30,50]. What will be the output of Lst[: :] == 1
Lst[::1]?
(A) Error (B) True (C) False (D) None
9 If a table carries 10 columns and 15 rows, what is its degree? 1
(a) 10 (b) 150 (c) 15 (d) 25
10 The seek(n) places the file pointer at position n with reference to 1
(a) Beginning (b) End (c) Current position (d) Position 10
11 State True or False: 1
An exception is an event, which occurs during the execution of a program
that disrupts the normal flow of the program's instructions
12 Predict the Output: 1
value = 50
def display(N):
global value
value = 25
if N%7==0:
value = value + N
else:
value = value - N
print(value, end="#")
display(20)
print(value)
13 Which among the following are constraints ? 1
(a) Primary key (b) Unique (c) NOT NULL (d) All of these
14 User can write Python script using 1
(a) MySQL.connector library
(b) SQL.connect library
(c) MySQL.connect library
(d) None of these
15 To see a list of all the databases in the system , the..............command may 1
be used.
(a) Show (b) Show databases (c) Display databases (d) View databases
16 The clause to arrange the data of a column in descending order is 1
(a) DESC (b) GROUP BY (c) LIKE (d) ASC
17 Fill in the blank: 1
. _____is a protocol used for remote login.
(a) HTTP (b) PPP (c) IRCP (d) Telnet
18 Modulation and demodulation is performed by 1
(a) microwave (b) satellite (c) modem (d) gateway
19 ______is a protocol used for uploading and downloading of files in a 1
network.
(a) SMTP (b) FTP (c) PPP (d) VoIP
20 Assertion (A) A Python function that accepts parameters can be called 1
without any parameters. Reason (R) Functions can carry default values that
are used, whenever values are not received from calling function.
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is False but R is True
21 Assertion (A) A binary file uses the dump() function to write data into it. 1
Reason (R) The load() function reads data from a binary file
(a) Both A and R are true and R is the correct explanation for A
(b) Both A and R are true and R is not the correct explanation for A
(c) A is True but R is False
(d) A is False but R is True
SECTION B
22 How List and tuple are different with one another. Justify the answer 2
23 List down membership operators and Identity Operators 2
24 Identify the output of the following Python statement. 2
lst1 = [10, 15, 20, 25, 30]
lst1.insert(3, 4)
lst1.insert(2, 3)
print (lst1[– 5])
OR
Identify the output of the following Python code
D = {1: “One”, 2: “Two”, 3: “Three”}
L=[]
for K, V in D.items():
if V[0] = = “T”:
L.append (K)
print(L)
25 What possible output(s) is/are expected to be displayed on the screen at the 2
time of execution of the program from the following code ? Also specify
the maximum and minimum value that can be assigned to the variable R
when K is assigned value as 2.
import random
Signal = [ 'Stop', 'Wait', 'Go' ]
for K in range(2, 0, -1):
R = random.randrange(K)
print (Signal[R], end = ' # ')
26 Riya was asked to accept a list of even numbers ,but she did not put the 2
relevant condition while accepting the list of numbers. She wrote a user
defined function odd to even (L) that accepts the list L as an argument and
converts all the odd numbers into even by multiplying them by 2.
def oddtoeven (L)
for i in range (size(L)):
if (L[i]%2! == 0)
L[i]= L[1] ** 2
print (L)
There are some errors in the code . Rewrite the correct code.
27 Consider the tables Student and House given below. What will be the 2
output of the statement given?

SELECT S.Sname , H.Lname FROM Student S, House H WHERE


S.Hcode = H.Hcode AND SName LIKE “R%”;
28 Write any one advantage and disadvantage of Bus topology 2
OR
Expand the term POP3 and its purpose
SECTION C
29 Write a function countmy( ) in Python to read the text file “Data.txt” and 3
count the number of times “my” occurs in the file.
For example If the file contents are:
My first book was. Me and My Family.
It gave me chance to be known to the world.
The output of the function should be
No. of times “my” occur : 2
30 Dev Anand have a list of 10 numbers. You need to help him create a 3
program with separate user defined functions to perform the following
operations based on this list.
● Traverse the content of the list and push the numbers divisible by 5 into
the stack.
● Pop and display the content of the stack, if the stack is empty display the
message” STACK EMPTY”
For Example:
If the sample Content of the list is as follows:
N=[2,5,10,13,20,23,45,56,60,78]
After the push operation the list must contain
5,10,20,45,60
And pop operation must display the output as
60
45
20
10
5
STACK EMPTY
31 Write the output of the queries (i) to (iii) based on the table FURNITURE 3
given below.

(i) SELECT SUM(DISCOUNT) FROM FURNITURE WHERE


COST>15000;
(ii) SELECT * FROM FURNITURE WHERE DISCOUNT>5 AND FID
LIKE “T%”;
(iii) SELECT DATEOFPURCHASE FROM FURNITURE WHERE
NAME IN (“Dinning Table”, “Console Table”);
SECTION D
32 Write the output for SQL queries (i) to (iv), which are based on the table 4
CARDEN.
(i) SELECT COUNT(DISTINCT Make) FROM CARDEN;
(ii) SELECT COUNT(*) Make FROM CARDEN;
(iii) SELECT CarName FROM CARDEN WHERE Capacity = 4;
(iv) SELECT SUM (Charges) FROM CARDEN WHERE Color =
“SILVER”;
33 Write a program using following functions : 4
(a) inputStud() :To input details of as many students and add them to a csv
file “college.csv” without removing the previous records.
SrNo,Studname,City,Percentage
(b) readCollege() : To open the file “college.csv” and display records
whose city is “Kolkata”
34 Consider the following tables GARMENT and FABRIC. Write SQL 4
commands for the statements (i) to (iv)

(i) To display GCODE and DESCRIPTION of each GARMENT in


descending order of GCODE.
(ii) To display the details of all the GARMENTs, which have
READYDATE in between 08-DEC-07 and 16- JUN-08 (inclusive of both
the dates).
(iii)To display the average PRICE of all the GARMENTs. Which are made
up of FABRIC with FCODE as F03.
(iv) To display FABRIC wise highest and lowest price of GARMENTs
from GARMENT table. (Display FCODE of each GARMENT along with
highest and lowest price.)
35 Write the code to create a table Product in database Inventory with 4
following fields
Note the following to establish the connection between Python and
MySQL:
Host : localhost
Username : system
Password : hello
Database : Inventory
SECTION E
36 Aditi is a Python programmer. He has written a code and created a binary 5
file employee.dat with employeeid, ename and salary. The file contains 10
records.
He now has to update a record based on the employee id entered by the user
and update the salary. The updated record is then to be written in the file
temp.dat. The records which are not to be updated also have to be written to
the file temp.dat. If the employee id is not found, an appropriate message
should to be displayed.
37 Granuda consultants are setting up a secured network for their office 5
campus at Faridabad for their day-to-day office and web based activities.
They are planning to have connectivity between 3 buildings and the head
office situated in Kolkata.
Answer the questions (i) to (v) after going through the building positions in
the campus and other details, which are given below:

(i) Suggest the most suitable place (i.e. block) to house the server of this
organisation. Also, give a reason to justify your suggested location.
(ii) Suggest a cable layout of connections between the building inside the
campus.
(iii)Suggest the placement of the following devices with justification:
(a) Switch (b) Repeater
(iv) The organisation is planning to provide a high speed link with its head
office situated in the Kolkata using a wired connection. Which of the
following cable will be most suitable for this job?
(a) Optical fibre (b) Co-axial cable (c) Ethernet cable
(v) Consultancy is planning to connect its office in Faridabad which is more
than 10 km from Head office. Which type of network will be formed?

You might also like