Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Python Functions

Total questions: 13

Worksheet time: 7mins

Name
Class
Date
1.
What will print?
a)
nothing
b)
5
c)
6
d)
an error message
2.

Which of the following items are present in the function header?

a)

Function name only

b)

Both function name and parameter list

c)

parameter list only

d)

Return value

3.

Which of the following keywords marks the begining of the function block?

a)

Func

b)

define

c)

def

d)

function

4.

What term is used to describe data passed into/out of a program?

a)

Variable

b)

Loop

c)

Constant

d)

Parameter

5.

What is a piece of code that can take inputs to perform a certain task?

a)

a function

b)

arguments

c)

parameters

6.

Consider the line of code:

Label('Go Team', 200, 100)

What is the Label?

a)

argument

b)

parameter

c)

function name

7.

Consider the line of code:

Label('Go Team', 200, 100)

What is 'Go Team' ?

a)

argument

b)

parameter

c)

function name

8.

When defining a function, the definition must occur before it is called.

a)

true

b)

false

9.

Which of the following terms best describes the code above?

a)

function call

b)

function definition

10.

What is the name for the code highlighted in red?

a)

function name

b)

function definition

c)

parameters

d)

arguments

11.

Line 6 is called

a)

function definition

b)

function call

c)

function name

12.

The code highlighted in blue is best defined as:

a)

function name

b)

function call

c)

function definition

d)

arguments

e)

parameters

13.

What is a parameter in a function?

a)

input value to a function for the function’s execution

b)

a variable used to send information to a function

c)

the name of the function

d)

the name of the main program calling the function