wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Functions

Total questions: 15

Worksheet time: 5mins

Name
Class
Date
1.

A named blocks of code that are designed to do one specific job is called as________

a)

Loop

b)

Function

c)

Block

d)

Branching

2.

A Function which calls itself is called as (a)  

3.

While defining a function which of the

following symbol is used.

a)

;(semi colon)

b)

.(dot)

c)

$(dollar)

d)

:(colon)

4.

Which function is called anonymous function?

a)

Lambda

b)

Recursion

c)

Function

d)

Define

5.

Which keyword to be used to define a function in Python?

a)

def

b)

Local

c)

Rec

d)

Global

6.

Which of the following is used, if you don’t need to type all the python code for the same task again and again?

a)

Statement

b)

Scope

c)

Control Structure

d)

Function

7.

How many types of scopes in Python?

a)

1

b)

3

c)

2

d)

4

8.

pow (5, 2) is equivalent to_______

a)

5 * 2

b)

5 * * 2

c)

2 * * 5

d)

2 * 5

9.

How many types of functions are there in

python?

a)

2

b)

4

c)

5

d)

6

10.

print (ord(‘A’) displays____

a)

65

b)

A

c)

a

d)

97

11.

The default presidium of fixed point constant is______

a)

7

b)

6

c)

8

d)

16

12.

Choose odd man out:

a)

User Defined

b)

Built-in

c)

Parameters

d)

Recursion

13.

A_____ variable declared inside the function’s body is known as

a)

File scope

b)

Global scope

c)

Local scope

d)

Function scope

14.

A block within a block is called ________block.

a)

Nested

b)

Control

c)

Compressed

d)

Called

15.

The _____ function is inverse of ord () function.

a)

Id()

b)

Chr()

c)

Bin()

d)

None of these