wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PYTHON REVISION

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.

Who is the founder of Python Programming Language?

a)

Rasmus Ganilo

b)

Dennis Ritchie

c)

Guido van Rossum

d)

James Gosling

2.

File extension of Python program is ______

a)

.py

b)

.p

c)

.pyx

d)

.pyy

3.

List index begins with _________.

a)

0

b)

1

c)

-1

d)

-2

4.

Which method adds element at the end of the List?

a)

add()

b)

append()

c)

new()

d)

insert()

5.

_________________is an anonymous function.

a)

User Defined

b)

Default

c)

Lambda

d)

Reserved

6.

____________ is a collection which is unordered, changable and indexed.

a)

Dictionary

b)

List

c)

Tuple

d)

Set

7.

Python 3.7 was released on

a)

June 2016

b)

June 2017

c)

June 2018

d)

June 2019

8.

IN and NOT IN are membership operators.

a)

TRUE

b)

FALSE

9.

IS is an Identity Operator.

a)

True

b)

False

10.

List = [2.3, 4.445, 3, 5.33, 1.054, 2.5]

print(List.pop()) What willbe the answer?

a)

2.3

b)

2.5

c)

1.054

d)

4.445

11.

What will be the anser for this code?

a)

120

b)

650

c)

225

d)

400

12.

In Python_____________ are written with round brackets

a)

tuples

b)

dictionary

c)

list

d)

set

13.

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

a.count(2)

What will be the answer?

a)

2

b)

1

c)

3

d)

4

14.

Keys and Values are related to ________

a)

tuple

b)

dictionary

c)

list

d)

set

15.

The def keyword, along with the function name is used to define the __________

a)

file

b)

block

c)

function

d)

variable

16.

_______is used as a dummy place holder whenever a syntactical requirement of a certain programming element is to be fulfilled without assigning any operation

a)

Pass

b)

Break

c)

While

d)

Goto

17.

What will be the Output?

a)

1

b)

2

c)

3

d)

4

18.

List = [1, 2, 3, 1, 2, 1, 2, 3, 2, 1]

print(List.count(1))

What will be the output?

a)

1

b)

2

c)

3

d)

4

19.

x = lambda a, b : a * b

print(x(5, 8))

What will be the output?

a)

35

b)

13

c)

40

d)

45

20.

____________does not hold duplicate values and is unordered.

a)

Set

b)

Tuple

c)

Dictionary

d)

List