Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

1045 Week 11 (Recursion)

Total questions: 4

Worksheet time: 2mins

Name
Class
Date
1.

Why use recursion?

a)

Its faster than loops

b)

Its always easier to code than loops

c)

There are cases where loops simply cannot complete a task but recursion can

d)

No reason to use recursion

2.

What are the pros of recursion?

a)

Easy to read the code

b)

Fast and memory efficient

c)

Can handle cases that loops cannot

3.

What are the cons of recursion?

a)

Slower than loops in simple iteration

b)

Can be memory hungry

c)

Can make the code very complicated

d)

There are traps if not implemented properly

4.

What are some important aspects of a recursive function vital to it being able to properly function?

a)

A clearly defined base case

b)

Short, easily readable code

c)

It must have an auxilliary/helper function

d)

Each recursive call must incrementally add to finding the solution