11 Cs Term-1 Block Test-1
11 Cs Term-1 Block Test-1
General Instructions:
a. ASCII
b. Extended ASCII
c. Unicode
d. ISCII
8 Which of the following operator cannot be used with string data type?
a. +
b. in
c. *
d. /
9 Combination of 4 bits is called a
a. Byte
b. Nibble
c. Kilo Byte
d. None of the above
10 Which of the following symbol is used in Python for single line comment?
a. /
b. /*
c. //
d. #
11 Evaluate the following expression and identify the correct answer.
16 - (4 + 2) * 5 + 2**3 * 4
a. 54
b. 46
c. 18
d. 32
12 Which of the following is not a complex number in Python?
a. k = 2 + 3j
b. k = complex(2, 3)
c. k = 2 + 3I
d. k = 2 + 3J
13 Which of the following sequences would be generated in the given line of code?
range (5, 0, -2)
a. 5 4 3 2 1 0 -1
b. 5 4 3 2 1 0
c. 5 3 1
d. None of the above
14 The binary equivalent of (120)10 is
a. 1111000
b. 1110000
c. 11001010
d. 01011110
15 The expression of a NAND gate is
a. A.B
b. A’B+AB’
c. (A.B)’
d. (A+B)’
a. (A’ + B)(C’ + D)
b. (A + B’)(C’ + D)
c. (A’ + B)(C’ + D)
d. (A + B’)(C + D’)
20 What will be the output of below Python code?
str1="Information"
print(str1[2:8])
a. format
b. Formation
c. Orma
d. ormat
21 If str1="Programming Language"
What does str1.find("m") return?
23 Which one of the following analyses and executes the source code in line-by-line manner, without
looking at the entire program?
a. Compiler
b. Interpreter
c. Assembler
d. None of these
24 What shape represents a decision in a flowchart?
a. A diamond
b. A rectangle
c. An oval
d. None of these
a,b,c=11,22,33
a,b=c+2,a*3-b
print(a,b,c)
a. Syntax error
b. 35 11 33
c. 35 22 33
d. 11 22 33
27 What is the output of following code:
i=1
while True:
if i%3==0:
break
print(i)
i+=1
a. No output
b. 1
2
3
c. 0
1
2
d. 1
2
a. 12345678
b. 123456789
c. 2345678
d. 23456789
29 Operating system is an example of
a. Application software
b. System software
c. Utility program
d. None of the above
30 What will be the output of the following code?
x = 12
for i in x:
print(i)
a. 12
b. 1 2
c. Error
d. None of the above
31 What is the output of the following?
>>>"abbabbabbabba".count("ab")
a. 3
b. 4
c. 5
d. 13
32 What will be the output of the following code?
a=0
for i in range(4,8):
if i%2==0:
a=a+i
print(a)
a. 4
b. 8
c. 10
d. 18
33 What is the output of following code:
c=0
for x in range(10):
for y in range(5):
c+=1
print(c)
a. 50
b. 51
c. 0
d. 49
34 Which component of a computer connects the processor to the other hardware?
a. System Bus
b. CPU
c. Memory
d. Input unit
35 What will be the output of the following :
>>> a = 'India'
>>> a *= 3
>>> a
a. ‘IndiaIndiaIndia’
b. ‘India3’
c. ‘3India’
d. None of the above
i=0
while i < 5:
print(i,end=" ")
i += 1
if i == 3:
break
else:
print(0,end=" ")
a. 00102
b. 01234
c. 0123
d. 001023
38 Predict the output of the following:
for i in range(3):
pass
print(i,end=" ")
a. No output
b. 0 1 2
c. 0 1 2 3
d. 1 2 3
39 What will be the output of the following :
x=10
y=5
for i in range(x-y*2):
print("%",i)
a. No output
b. %0
c. 10
d. 0
41 What will be the output of the following :
x="one"
y="two"
c=0
while c<len(x):
print(x[c],y[c])
c=c+1
a. o t
nw
eo
b. one
two
c. one two
d. o t
42 What will be the output of the following :
num=20
sum=0
for i in range(10,num,3):
sum+=i
if i%2==0:
print(i*2)
else:
print(i*3)
a. 20
39
32
57
b. 20
30
c. 20
30
40
d. 20
33
46
43 What will be the output of the following Python code snippet?
print('abef'.replace('cd', '12'))
a. abef
b. 12
c. Error
d. none of the mentioned
44 What will be the output of the following Python code snippet?
x = "abcdef"
i = "a"
while i in x:
print(i, end = " ")
a. no output
b. iiiiii…
c. aaaaaa…
d. abcdef
45 What will be the output of the following Python code?
i=1
while False:
if i%2 == 0:
break
print(i)
i += 2
a. 1
b. 1 3 5 7 …
c. 1 2 3 4 …
d. No output
46 What will be the output of the following Python code?
>>>str1="helloworld"
>>>str1[::-1]
a. dlrowolleh
b. hello
c. world
d. helloworld
print('abcdefcdghcd'.split('cd', 2))
a. abcd
b. ABCD
c. aBCD
d. error
49 What will be the output of the following Python code?
print("abc DEF".capitalize())
a. abc def
b. ABC DEF
c. Abc def
d. Abc Def
Section-C
Case Study based Questions
This section consists of 6 Questions (50 -55) Attempt any 5 questions.
Krrishnav is looking for his dream job but has some restrictions. He loves Delhi and would take a job
there if he is paid over Rs.40,000 a month. He hates Chennai and demands at least Rs. 1,00,000 to work
there. In any another location he is willing to work for Rs. 60,000 a month. The following code shows his
basic strategy for evaluating a job offer.
Code:
pay=
location=
if location == "Mumbai":
print ("I’ll take it!") #Statement 1
elif location == "Chennai":
if pay < 100000:
print ("No way") #Statement 2
else:
print("I am willing!") #Statement 3
elif location == "Delhi" and pay > 40000:
print("I am happy to join") #Statement 4
elif pay > 60000:
print("I accept the offer") #Statement 5
else:
print("No thanks, I can find something better")#Statement 6
On the basis of the above code, choose the right statement which will be executed when different inputs
for pay and location are given.