wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Class XI Revision I

Total questions: 43

Worksheet time: 16mins

Name
Class
Date
1.

Which of the following is not a keyword?

a)

eval

b)

assert

c)

nonlocal

d)

pass

2.

Which of the following cannot be a variable?

a)

__init__

b)

in

c)

it

d)

on

3.

Which of the following are invalid variables?

a)

my_string_1

b)

1st_string

c)

foo

d)

__

e)

my&string

4.

Select correct Boolean literal

a)

true

b)

TRUE

c)

false

d)

True

5.

Which of the following declarations is incorrect?

a)

x=2

b)

_x=3

c)

_xyz_=5

d)

None of these

6.

Identify the invalid logical operator in Python from the following

a)

and

b)

or

c)

not

d)

Boolean

7.

Which of the following is correctly evaluated for this function? pow(x,y,z)

a)

(x**y)/z

b)

(x/y)*z

c)

(x**y)%z

d)

(x/y)/z

8.

Which of the following is an invalid statement?

a)

abc = 1,000,000

b)

a b c = 1000 2000 3000

c)

a,b,c = 1000, 2000, 3000

d)

a_b_c = 1,000,000

9.

What data type is the object below? L = 1, 23, ‘hello’,1

a)

list

b)

dictionary

c)

array

d)

tuple

10.

What is the value of this expression 2*3**2**1 ?

a)

9

b)

12

c)

18

d)

36

11.

Operators with the same precedence are evaluated in which manner?

a)

left to right

b)

right to left

c)

can't say

d)

None of the mentioned

12.

Select the option that makes x get an integer value.

a)

x = 13 // 2

b)

x = int(13 / 2)

c)

x = 13 % 2

d)

All of the mentioned

13.

What will be the output ?

s='hello\nworld'

print(s[3:8])

a)

lo

wo

b)

lo\nwo

c)

llo

wo

d)

llo\nwo

14.

What will be the output of the following code ?

print(“100+200”)

a)

300

b)

100200

c)

100+200

d)

200

15.

Which of the following results in a SyntaxError?

a)

' "Once upon a time…", she said.'

b)

"He said, ' Yes!' "

c)

'3\'

d)

" 'That's okay " '

16.

Which of the following will print the lines in this way

Term1

Preboard

CBSE

a)

a) print('''Term1

Preboard

CBSE''')

b)

print("Term1, Preboard, CBSE")

c)

print('Term1\nPreBoard\nCBSE')

d)

print('Term1\

Preboard\

CBSE')

17.

A=tuple(“Python”)

print(A)


What is the output?

a)

(‘Python’)

b)

('Python',)

c)

(‘P’,‘y’,‘t’,‘h’,‘o’,‘n’)

d)

Error in first line.

18.

Write the output of the following:

a=(“Amit”,“Sumit”,”Ashish”,”Sumanta”)

print(max(a))

a)

Sumanta

b)

Ashish

c)

Sumit

d)

Amit

19.

List AL is defined as follows: a=[1,2,3,4,5]

Which of the following statement/statements removes the middle element 3 from it so that the list a equals [1,2,4,5] ?

a)

del a[2]

b)

a[2:3] = [ ]

c)

a[2 : 2]=[ ]

d)

a[ 2 ] = [ ]

e)

a.remove(3)

20.

Which command can we use to add 5 at the third position in list1?

a)

list1.insert(3,5)

b)

list1.insert(2,5)

c)

list1.add(3,5)

d)

list1.append(3,5)

21.

Which of the following is not a complex number?

a)

k = 2 + 3j

b)

k = complex(2, 3)

c)

k = 2 + 3i

d)

k = 2 + 3J

22.

What does ~~~4 evaluate to?

a)

-5

b)

-4

c)

-3

d)

+3

23.

What is the value of x if:

x>>2=2

a)

8

b)

4

c)

2

d)

1

24.

Which of the following are incorrect?

a)

x = 0b101

b)

x = 0x4f5

c)

x = 09123

d)

x = 0o864

25.

What will be the value of the following Python expression?

4 + 3 % 5

a)

4

b)

7

c)

2

d)

0

26.

What will be the value of X in the following Python expression?

X = 2+9*((3*12)-8)/10

a)

30.0

b)

30.8

c)

28.4

d)

27.2

27.

What will be the output of the following Python expression if x=15 and y=12?

x&y

a)

b1101

b)

0b1101

c)

12

d)

1101

28.

What will be the output of the following Python code snippet?

['hello', 'morning'][bool('')]

a)

IndexError

b)

No output

c)

'hello'

d)

'morning'

29.

What will be the output of the following Python code snippet?

not(1&1)

a)

True

b)

False

c)

0

d)

1

30.

What will be the output of the following Python code?

if (9 < 0) and (0 < -9):

.... print("hello")

elif (9 > 0) or False:

.... print("good")

else:

.... print("bad")

a)

TypeError

b)

'hello'

c)

'good'

d)

'bad'

31.

If the following code is executed, what will be the output of the following code?

Title="Online Teaching 2021"

print(Title[6:10], Title[-2:-4:-1])

a)

'Tea 20'

b)

'e Tea 202'

c)

'Tea 1202'

d)

'Teac 1202'

32.

Write the output of the following python expression: print((4>5) and (2==1) or (4<9) or (2/0))

a)

False

b)

True

c)

ZeroDivisionError

33.

Suppose list1 is [2, 33, 222, 14, 25],

What is list1[:-1] ?

a)

[2, 33, 222, 14]

b)

[ ]

c)

[25]

d)

[25, 14, 222, 33, 2]

34.

Which of the following is not a declaration of the dictionary?

a)

{1: ‘A’, 2: ‘B’}

b)

dict([[1,”A”],[2,”B”]])

c)

{1,”A”,2”B”}

d)

{ }

35.

Suppose d = {"john":40, "peter":45}, to delete the entry for “john” what command do we use?

a)

d.delete("john":40)

b)

d.delete("john")

c)

del d["john"]

d)

d.remove("john")

e)

d.popitem('john')

36.

b=(1,5,98,214,2,6)

Which of the following methods are wrong?

a)

print(b.sort())

b)

print(len(b))

c)

print(b[2])

d)

print(b.index(2))

37.

Which of the following will raise an error if the given key is not found in the dictionary?

a)

del statement

b)

pop()

c)

getitem()

d)

All of these

38.

Write the output of the following:

a=(1,2,3,2,3,4,5)

print(min(a)+max(a)+a.count(2))

a)

13

b)

6

c)

8

d)

AttributeError

39.

What does strip() function on a string do?

a)

Removes the trailing or leading spaces

b)

Removes '\n' at the end of the string

c)

Removes all the spaces between words

d)

Removes the trailing or leading spaces and any spaces in between too

40.

Which of the following statements will return the first three characters of a string s ?

a)

s[3:]

b)

s[:3]

c)

s[0:4]

d)

s[-4: :-1]

41.

What is 4%3//5?

a)

0

b)

1

c)

ZeroDivisionError

d)

0.0

e)

1.0

42.

What is the return value of math.trunc() ?

a)

int

b)

bool

c)

float

d)

None

43.

Which of the following expressions results in an error?

a)

float('10')

b)

int('10')

c)

float('10.8')

d)

int('10.8')

e)

int(10.8)