NEW
Font size
WorksheetsLETS PLAY QUIZ - PYTHON CBSE CLASS XII
Total questions: 20
Worksheet time: 17mins
1. for k in range (2,7) :
print(k, end=' ')
1 2 3 4 5 6
2 3 4 5 6 7
2 3 4 5 6
0 1 2 3 4 5 6
2. str1="Welcome"
>>> print(str1*2)
Wlecome2
2 Welcome
Error
WelcomeWelcome
L=[1,3,6,23,41]
>>> L[2:4]
[6, 23]
[3,6,23,41]
[6,23]
[6,23,41]
[23,41]
What data type is the object below?
L = [1, 23, 'hello', 1]
tuple
array
list
dictionary
which statement makes the loop to forcefully exit
continue
exit
pass
break
Lst=[12,23,41,2,31,45,67,21]
Lst.pop()
12
21
No elements will be popped
1
School = "Sri Chaitanya"
P=len(School)
>>> print (P)
12
13
14
15
def Display(k) :
Answer = k**3 + 42
return Answer
value=2
print(Display(value))
50
51
48
44
def mysum(a,b,c) :
print(a + b +c)
p,q,r = 10,20,30
p,q,r=p+q,q+r,r+p
mysum(p,q,r)
100
110
80
120
count=1
while count<8:
print ( count )
count + = 3
1 2 3 4 5 6 7
1 4 7
1 3 6
1 4 7 10
The data type which returns true or false value
int
float
bool
string
Out of the following whc=ich data type is mutable
int
List
string
float
. What will be the output of the following Python statement?
str1="abcd"
>>>str1[2:]
a
ab
cd
dc
. What arithmetic operators cannot be used with strings?
+
*
-
All of the mentioned
What is the answer to this expression, 22 % 3 is?
7
1
0
5
What will be the output of the following Python code?
x = 'abcd'
for i in range(len(x)):
print(i)
a) a b c d b
b) 0 1 2 3
c) error
d) 1 2 3 4
What will be the output of the following Python code?
def say(message, times = 1):
print(message * times)
say('Hello')
say('World', 5)
Hello
WorldWorldWorldWorldWorld
Hello
World 5
Hello
World,World,World,World,World
Hello
HelloHelloHelloHelloHello
Which of the following is an invalid variable?
a) my_string_1
b) 1st_string
c) sanjeev_prithiv
d) _abc
str1="CBSE BOARD EXAM 2022"
str1.split()
" CBSE BOARD EXAM 2022"
"CBSE","BOARD", "EXAM","2022"
["CBSE","BOARD","EXAM","2022"]
[ CBSE,BOARD,EXAM,2022]
myList = [1, 2, 3, 4, 5, 6]
for i in range(1, 6):
myList[i - 1] = myList[i]
for i in range(0, 6):
print(myList[i], end = " ")
a) 2 3 4 5 6 1
b) 6 1 2 3 4 5
c) 2 3 4 5 6 6
d) 1 1 2 3 4 5
