Sunteți pe pagina 1din 4

OBJECTIVE TYPE PERIODIC TEST II 1

SESSION->2019-20

CLASS-XI

SUBJECT:COMPUTER SCIENCE WITH PYTHON

(For Instructions Refer to OMR Sheet)

Q1. for i in[1,2,3,4][::-1] Q11 y=str(123)

print(i) x=”hello”*3

O/p? print(x,y) O/p is ?

A)4 b)1 c)Error-Syntax d)None of all a) hellohellohello 123 b)hello3123


c)Error d)None of these
3 2
Q12 In continuation to Q11Consider next lines as
2 3 x=”Hello”+”World”

1 4 y=len(x)

Q2 myList=[‘school’,’ofexcellence’] print(x,y) O/p is ?

for i in myList: a)HelloWorld10 b)HelloWorld5 c)Error


d)None of these
i.upper()
Q13 Python debugger program is
print(myList)
a)pda b)pdb c)pdc d)pdp
O/p? a)[‘school’,’ofexcellence’]
b)[‘SCHOOL’,’OFEXCELLENCE’] c)[None,None] Q14 Python List is
d)Unexpected
a)Mutable b)Immutable c)Both d)None of
Q3 i=1 these
while True: Q15 a,b,c=[1,2],[1,2],[1,2]

If i%007==0: print(a==b)

break; O/p? a)False b)True c)Error d)None

print(i) Q16 L1=[3,4,5]

i+=1 L2=L1*2

O/p? a)1 2 3 4 5 6 b)1 2 3 4 5 6 7 c)error print(L2)


d)None of these
O/p? a) [3,4,5,3,4,5] b)[3,4,5]
Q4 True=False c)[[3,4,5],[3,4,5]] d)none.

while True: Q17 L1=[1,2]

print(True) print(L1*2.0)
break O/p? a)[1,2,1,2] b)[[1,2],[1,2]] c)Error
2 OBJECTIVE TYPE PERIODIC TEST II

SESSION->2019-20

CLASS-XI

SUBJECT:COMPUTER SCIENCE WITH PYTHON

(For Instructions Refer to OMR Sheet)

O/p? a)False b)True c)Error d)None of these d)[1,2,2,1]

Q5mystring=”SchoolofExcellence” Q18 L1=[1,2,3]

i=”i” L2=L1+2

while i in mystring: print(L2)

print(“Welcome to SOE”) a) [1,2,3,2] b)[1,2,3] c)Error d)None of


these
O/p? a)False b)”Welcome to SOE” c)Error
d)None Q19 L1=[3,3,8,1,3,0,’1’,’0’,’2’,’e’,’w’,’e’,’r’]

print(L1[::-1])

Q6 Which is not a python Legal String operation? O/p: a)[‘r’,’e’,’w’,’e’,’2’,’0’,’1’,0,3,1,8,3,3]

O/p? a)’abc’+’abc’ b)’abc’*3 c)’abc’+3 b)[r] c)error


d)’abc’.lower d)[3,3,8,1,3,0,’1’,’0’,’2’,’e’,’w’,’e’,’r’]

Q7 s=”SOE SEC-23 ROHINI” Q20 in Q19 O/p of print(L1[-1:-2:-3])

print(s[9]+s[9:18]) A) r b)e c)3 d)w

O/p? a)23 ROHINI b)”SOE SEC-23 ROHINI” Q21 in continuation to Q19 O/p of print(L1[-1,-2,-
c)Error-iNDEX OUT OF BOUND d)23 ROHINI23 3,-4])
ROHINI
a) [‘r’] b)[3,3] c)Error d)None of these
Q8 L1=[1,3,5,7,9]
Q22 t2=(4,5,6)
print(L1==L1.reverse())
t3=(6,7)
print(L1)
T4=t3+t2
A ) True [1,3,5,7,9] b)False [ 9,7,5,3,1]
c)Error d)None of these T5=t2+t3

Q9 print(“Hello*2”) print(t4)

O/p a)HelloHello b)Hello*2 c)Hello2 d)Hello O/p? a)(6,7,4,5,6) b)(4,5,6,6,7) c)Error d)None
of these
Q10 (446)8=(?)16
Q23 O/p of print(t5) in Q19 will be:
O/p? a)126 b)128 c)132 d)146
a) False b)True c)Error d)None of these

Q36. Which two are true regarding MYSql ?

a)It is a DBMS b)IT is a RDBMS


OBJECTIVE TYPE PERIODIC TEST II 3

SESSION->2019-20

CLASS-XI

SUBJECT:COMPUTER SCIENCE WITH PYTHON

(For Instructions Refer to OMR Sheet)

Q24 t3=(6,7) c) It is open source d)It is proprietary


Q37. SQL is a procedural language
t4=t3*3 a)True b) False
Q38. Which type of database management
t5=t3*(3) system is MySQL?
a) Object-oriented b)Hierarchical
print(t4) c)Relational d)Network
Q39. What represents an ‘attribute’ in a
O/p? a)(6,7,3) b)(6,7,6,7,6,7) c)Error d)None of relational database?
these a. Table b)Row c)Column d)Object
Q40. MySQL is freely available and is open
Q25 O/p of print(t5) in continuation of Q24 source.
a) True b)False
a)(6,7,3) b)(6,7,6,7,6,7) c)Error d)None of Q41. What represents a ‘tuple’ in a relational
these database?
a) Table b)Row c)Column d)Object
Q26 O/p? Q42. In MySQL databases, the structure
representing the organizational views of the
Tuple_a=’a’,’b’ entire databases is ____________
a) Schema b)View c)Instance d)Table
Tuple_b=(‘a’,’b’) Q43. A table can have more than 1 primary key?
a) True b)False
print(Tuple_a==Tuple_b) Q44. A table has three rows and 5 columns the
cardinality is?
a) False b)True c)Error d)None a) 3 b)5 c)8 d)15
Q45. A table has three rows and 5 columns the
Q27 tuple1=(‘Python’)+3 degree is?
a) 3 b)5 c)8 d)15
print(type(tuple1)) Q46. If the primary key constraint is dropped the
column and the data is lost too.
O/p? a) True b)False
Q47. Which of the following are DDL
a) tuple b)string c)Error d)integer commands?( Select Two)
A)Create table b)Insert c)Delete d)Drop table
Q28 perc=(88,85,80,88,83,86)
Q48. Which of the following are DML commands?
a=perc[2:2] ( Select Two)
a)Create table b) Insert c)Delete d)Drop table
b=perc[2:] Q49. Which of the following is both Unique and
not NULL? a) Primary Key b)Foreign Key c) Not
c=perc[:2] Null Column d)Default Column
Q50. R in RDBMS stands for and S in MySQL
d=perc[:-2] stands for?
a. Relational and Structured b)Relative
O/p ? print(a) and SEQUEL c)Rotational and
Structured
a) False b)True c)Error d)None d)Relational and Sequential

Q29 O/p? W.r.t Q28 print(b)


4 OBJECTIVE TYPE PERIODIC TEST II

SESSION->2019-20

CLASS-XI

SUBJECT:COMPUTER SCIENCE WITH PYTHON

(For Instructions Refer to OMR Sheet)

a) False b)True c)Error d)None

Q30 O/p? W.r.t Q28 print(c)

A) False b)True c)Error d)None

Q31 ntpl=(“Hello”,”Nita!”,”How’s”,”Life”)

(a,b,c,d)=ntpl

print(“a is =” , a)

print(“b is =”,b)

O/p is ?

A) Hello Nita! b)Hello Nita! How’s Life c)Error


d)Hello ___

Q32 Dictionary in Python is Key:Value Pair in


which

a) Key is Mutable b)Value is mutable


c)Key is Immutabe and Unique d)Both b and c.

Q33 t1={5:[6,7,8],”a”:(1,2,3)}

O/p? print(t1.keys())

A)5 a b)[6,7,8],(1,2,3) c)Error d)5,(1,2,3)

Q34 W.r.t print(type(d1))

O/p is

A) Dictionary b)tuple c)string d)List

Q35 W.r.t Q33 O/p of? print(t1.values())

A)5 a b)[6,7,8],(1,2,3) c)Error d)5,(1,2,3)

S-ar putea să vă placă și