Adobe Scan 16 Dec 2024
Adobe Scan 16 Dec 2024
0 1 1 1 1 1 1 1 1
The by
occupied
"Keshav".
are
D1? D1.del"Red"]
(d)
valuecharacters dictionary ()) file?
the I(2].capitalize binarydump)
(d) UPDATE
(d)
(2024-25)
EXAMINATION: only. has 6,9
(d) a (d)
true exceptions 6.0
(d)
marks.
mark.marks. marks.
marks. varchar(20)
many from
Python? afrom block.rows?
Language statement
Science 1 2 3 4 "Red"del.D1"Red"]
(c) existing
try-except
carries carries
carries 5
carries
carries How object
"Meenakshi". key= (b) -Fun in
PYTHON-is-Fun
PYTHON-Is
(d) multiple
Python datatype store()
(c)
Computer question
question
guestionquestion
question upper(),i|, used While(c) Python except raised in
Section
A 9,6 for
(c) be usingvaluesALTER
(c) (c) 8of
13.5
using pair to
handle 1Page
E one some code?
and EachEachEachEachEach
answeredA
of
key-value identifieraread is
exceptionerrors
PREBOARD
FIRSTXII value
attribute false?than cannot
Class:
C,D
21). 31).35).37).
D1["'
del
(b) R ed"] to executed syntax change following
A,B, 28).
questions.
to to to to to has
an char(20)6,20
delete
-code
SNewsjoin([l[0].
invalid
_for
used
(b) is
more
(b) isstatements
load() statement no "Four"]
-Sections
(1 (22 (29 (32 (36be
questions to database, (b) the method have alwaysexecuted,handles
to MODIFY
(b)
used the
37 questions
questions
questions questions an 13
(b)
are B? will of fun" can of "Three",
contains questions datatype attributefollowing output isfollowing interpreter output print(len(L)/2*len(L[0])
into5 module followingexcept is
command
21 MYSQL D1("Red")
delete
(a) is PYTHONIS-Fun
(a) Python-is-fun
(c) block isblockis
"1" False:
7 3 4 2 correct New)
(S
print try-except
divided
paper
Instructions:
General of of of of of
consists
consistsconsists
consists programming and
consists of
"Python
()
split
L=S. per%marks
(a) of
blockfinally== the Two",
the the pickle the
question
in
tableB A
attribute
attribute the save()
(a) 1 orTruePython
When SQL CHANGE
(a) be
will L=("One,
of
Time-3 is
hrs
paper (a) ofWhich
20,6 Select Which Which ofWhich One The Which What 6.5
(a)
A B
Section C
Section
D
Section E
Section
Section aIn A (b) (d) StateThe
S= (a) (c)
ThisThe
All
1. 2. 3. 4. 5. 6. 7. 8. Q1. Q2. Q3. Q4. Q5. Q6. Q7. 08. O9.
Q10 What will be the output of the given Python Code?
print("Welcome To My Blog"|2:6) +"Welcome To My Blog"5:9))
(a) Lcomme (b) lcomme T (c) lcomme To (d) lcomme
Q1l. Expand the following
(a)SMTP (b) URL
Q12. is a candidate key which is not selected as a primary key.
(a) Primary Key (b) Foreign Key (c) Candidate Key (d) Alternate Key
Q13. Fill in the blank:
protocol provides secure transfer of data on internet.
(a) HTTP (b) PPP (c) Telnet (d) HTTPS
Q14. Which of the
following statements is false?
(a) SMTP and POP protocols are used in email
(b) URL of a page is not always the same as its
communication.
domain name.
(c) HTTPS is safer than HTTP.
(d) Interlinking of collection of webpages is called
Q15. The correct syntax of tell() is :
Internet.
(a) tell.file_object() (b) file_object.tell()
(c) tell.file_object(1) (d) file_object.tell(1)
Q16. Which of the following functions is a valid
built-in function for both list and dictionary datatype?
(a) items() (b) len() (c) update() (d) values()
Q17. What will be the output when following expression be
evaluated in Python?
print(21.5|/4 +(8+3.0))
(a) 16.0 (b)14.0 (c) 15 (d) 15.5
Q18. Choose correct SQL query which is expected to delete all rows ofa table emp without deleting its
structure.
(a) DELETE TABLE; (b) DROP TABLE emp;
(c) REMOVE TABL emp; (d) DELETE FROM emp;
Q19. Which of the following is NOT a DML Command? 1
(a)Insert (b)Update (c)Drop (d)Delete
Q20 and 21 are ASSERTION AND REASONING based questions. Mark the correct choice as
(a) Both Aand Rare true and Ris the correct explanation for A
(b)Both A and Rare true and Ris not the correct explanation for A
(c) Ais True but Ris False (d) Ais false but Ris True
Q20. Assertion (A): For changes made to avariable defined within a function to be visible outside 1
the function, it should be declared as global.
Reasoning (R): Variables defined within a function are local to that function by default, unless
explicitly specified with the global keyword.
Q21. Assertion (A): In SQL, the aggregate function Avg) calculates the average value on a set of 1
values and produces a single result.
Reasoning (R): The aggregate functions are used to perform some fundamental arithmetic
tasks such as min(), max(), sum(), etc.
Section B
Q22. What happenswhen an attempt is made to change the value of an immutable object in Python? 2
Page 2 of8
Glve two string is defned in
examples
(a) Logical operatorsof each of the
Pthon?
Q24. it Dl=|1 102 following
20} and D2 460, (b)Lit buit-in functions
(Answer using built in 1.701
0) Write a functions
statement to dispiay onBy)
the keys of D1
OR
Writea statement to display
the key
()\WTite a
statement to addthe elementsvalue pairs of D2
of Dlat the end of
OR
D2.
Write a statement to delete the key
value pair of
ldentify the correct output(s) of the following code. D2 having key as 4.
Q25.
Also write the minimum and the
maximum possible values of the variable k.
Lmport random
k=random. randint (1, 3)
fruits=| 'mango', 'banana' , 'grapes',
ior i in range (k) : 'watermelon', 'papaya' )
print (fruits [j), end="*")
(a) mango*banana"grapes (b) banana"grapes
(c) banana* grapes*watermelon (d) mango*grapes"papaya
Q26. Rewrite the following code in Python after removing all the syntax errors.
Underline each 2
correction done in the code.
define fun():
HuMi, num2 = 10, 45
While numl % num2 == 0
numl+= 20
num2+= 30
print (numl, num2 )
fun (3)
Q27. (a) Differentiate between CHARand VARCHAR data types in SQL. 2
OR
Which constraint is used to uniquely identify a record in a table?
(b) Write an SQL command to print the details of those students from table STU whose name
starts with G and has only 5 characters.
OR
Write an SQL command to print the details of those students from table STUwhose name
contains A in it.
Q28. Write two advantages and two disadvantages of circuit switching.
OR
Differentiate between URL and domain name with the help of an example.
Section c
Q29. Atext file "PYTHON.TXT" contains alphanumeric text. Write a program that reads this text fie 3
and writes to another file "PYTHON1.TXT" entire file except the numbersor digits in the file
OR
Page 3 of 8
Wite a function COUNT) in Python toread fromatext file 'Gratitude.txt and display the cours
of the letter 'e' in each line.
Example: If the file content is as follows:
Gratitude is ahumble heart's radiant clow. Atimeless gift that nurtures and bestows. It'sthe
appreciation for the love we're shown, In moments big andsmall, it's truly known
The COUNT) function should
Line 1:3
display the output as:
Line 2:4
Line 3:6
Line 4: 1
Q30. GVen a Dictionary Stu dict containing marks of students for three
test-series in the form 3
Stu_|D:(TS1, TS2, TS3)as key-value pairs.
Write a Python program with the following user-defined
functions to perform the specified
operations on a stack named Stu _Stk
() Push_elements(Stu_Stk, Stu_dict) : It allows
pushing IDs of those
dictionary Stu_dict into the stack Stu Stk. who have scored more than orstudents, from the
in the TS3 Test. to equal 80 marks
(ii) Pop_elements (Stu_Stk): It rernoves all elements present inside the stack in
prints them. Also, the function displays 'Stack LIFO order and
stack.
Empty' when there are no elements in the
(ii) peep(Stu _Stk): This function displays the
If the stack is empty, the function
topmost element of the stack without deleting it.
should display 'None'.
OR
Anested list contains the data of visitors in a museum. Each of the inner lists
following data of a visitor: contains the
[V_no (int), Date (string), Name (string), Gender (String M/F),Age
Write the following user defined functions to
(int)]
perform given operations on the stack named
"status'" .
(i) Push_element(Visitors) - To Push an object
containing Gender of visitor who are in the age
range of 15 to 20.
(ii) Pop_element() -To Pop the objects from the stack and count and
display the number of
Male and Female entries in the stack. Also, display
"Done" when there are no elements in
the stack.
(ii) peep _element(): This function displays the topmost element of the stack without
deleting
it. If the stack is empty, the function should display 'None'.
Q31. Predict the output of the Python code given below:
Textl= "IND-23"
text=
I=0
while I<len (Textl ) :
if Text1 [I] >= "O" and Text l[I] <= g":
Val=int (Text[I])
Val=Val +1
Page 4 of 8
Text2=Text 2+str(Val)
elif Text [I]>= "A" ©nd Text [I]<= "2":
Text2=Text 2+(Text1 [I+1])
else: ND 34
Text2=Text2 +
I+=1
print (Text2)
OR
Predict the output of the Python code given below:
value = 50
def display (N):
global value
value = 25
if N87==0:
value=value+N
else:
value=value-N
print (value, end="#")
display (20)
print (value)
SectionD
Q32. Consider the following tables GAMES.
Table:GAMES
GCODE GAMENAME NUMBER PRIZEMONEY SCHEDULEDATE
101 CAROM BOARD 5000 2004/01/23
102 BADMINTON 2 12000 2003/12/12
103 TABLE TENNIS 8000 2004/02/14
105 CHESS 2 9000 2004/01/01
108 LAWN TENNIS 4 25000 2004/03/19
Page 5 of 8
SPORT.DAT and copies th
Write a function, copyData(), that reads contents from the file
function shOuld
records with Sport name as "Basket Ball" to the file named BASKET.DAT. The
return the total number of records copied to the file BASKET.DAT.
Q34. In a Database, there are two tables with the instances given below:
Table: STUDENTS
ADMNO NAME CLASS ADDRESS
1211 MEENA 12 A-25
1248 VANI 11 B-45
1244 KRISH 10 AB-45
1254 VANI 12 B-43
Table: SPORTS
ADMNO GAME COACH GRADE
1248 VOLLEYBALL MR. TIWARI A
1244 BASKETBALL MR. AMANDEEP B
1211 VOLLEYBALL MR. TIWARI
1287 KHO-KHO MS. RIYA A
(a) Write a query to display name and game of those students whose address is available in
students table.
(b) Write aquery to display Name of the students who are studying in class 12 and their
corresponding Coach names.
(c) Write a query to couint the number of students who play volleyball.
(d) Write a query to change the grade to A+ of those students who are in class 12.
Q35. Kiran created atable named Flight in MYSQL database Airline having following attributes: 4
Page 6 of 8
"Sample Size (Number of persons who participated in the survey in that country)
" Happy (Number of persons who accepted that they were Happy)
(a) Suggest the appropriate block where ACI should plan to install the server.
(b) Which type of network is formed by connecting the computers of these three blocks?
(c) Suggest the most appropriate block-to-block cable layout to connect all three blocks
for different communication.
(d) Which device should be placed/installed in each of these blocks to effectively connect
all the computers within these blocks?
(e) Suggest a protocol that shall be needed to provide Conferencing solution between
Kolkata Campus and others campuses.