Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Function

Total questions: 10

Worksheet time: 7mins

Name
Class
Date
1.

What is the purpose of len in Python?

a)

It is used for length operations

b)

It helps in printing output

c)

It is used to define functions

d)

It is used for error handling

2.

What is the purpose of round in Python?

a)

It is used for rounding numbers.

b)

It helps in printing output.

c)

It is used to define functions.

d)

It is used for error handling.

3.

What is the purpose of max in Python?

a)

It helps in printing output.

b)

It is used to define functions.

c)

It is used for error handling.

d)

It is used to find the largest number

4.

What is the result for the following Code?
print(round(3.1)

a)

3

b)

4

c)

-3

d)

-4

5.

What is the output for the following Code?
print(max([3,5,8,2])

a)

2

b)

8

c)

3

d)

5

6.

What is the output for the following Code?
print(len("Hello"))

(a)  

7.

What is the output of the following Code?
print(max(4,min(2,8))

(a)  

8.

What is the output of the following code?
print(max(len("Hi"),5))

(a)  

9.

What is the value of x in following expression?
x=pow(len("Python"),2)

a)

36

b)

32

c)

64

d)

18

10.

Which function used in Python to print the absolute value for any number?

(a)