wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

U4/L2 HS Kira- Fun with Functions

Total questions: 12

Worksheet time: 6mins

Name
Class
Date
1.

Which of the following is something you should do after watching the videos in this lesson?

a)

Write down facts you learned that you want to remember.

b)

Ignore the information presented in the videos.

c)

Only focus on the images in the videos.

d)

Memorize every word spoken in the videos.

2.

A ______________ is a block of organized, reusable code used to perform a specific task in a program.

a)

function

b)

variable

c)

loop

d)

array

3.

One benefit of using functions is that they help make your code more ______________ and easier to read.

a)

organized

b)

confusing

c)

lengthy

d)

random

4.

In Python, you define a function using the keyword ______________.

a)

def

b)

func

c)

define

d)

function

5.

In the example above, greet is the ______________ of the function.

a)

name

b)

parameter

c)

return value

d)

argument

6.

______________ refers to the rules for how code must be written so that it runs properly.

a)

Syntax

b)

Algorithm

c)

Variable

d)

Function

7.

Once a function is defined, you can use it again by ______________ it in your code.

a)

calling

b)

deleting

c)

ignoring

d)

commenting

8.

Reusing functions helps improve ______________ ______________, meaning your program runs more smoothly and avoids repeating the same code.

a)

code efficiency

b)

code length

c)

code color

d)

code errors

9.

In the "Painting Orange Rows" activity, you used a function to simplify the task of painting ______________ in a repeated pattern.

a)

orange rows

b)

blue columns

c)

green circles

d)

yellow squares

10.

The "Functions for Songs" activity showed how functions can be used to reduce ______________ by organizing repeating lines into a single function call.

a)

repetition

b)

confusion

c)

melody

d)

volume

11.

Functions are especially helpful for organizing code when a task needs to be done ______________ times in a program.

a)

multiple

b)

zero

c)

random

d)

single

12.

Why are functions useful in programming?

a)

Functions allow you to write clean, reusable code and also give you more flexibility to build creative, complex programs without repeating yourself.

b)

Functions make programs run slower and harder to understand.

c)

Functions are only used to store data, not to perform actions.

d)

Functions are required only in web development, not in other types of programming.