Search Header Logo

PP-T3-HL

Authored by Kiers Mcfarlane

Computers

12th Grade

Used 1+ times

PP-T3-HL
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is recursion?

A function that calls itself to solve a problem
A loop that repeats a certain number of times
A conditional statement that checks a specific condition
A function that performs an iteration using a for loop

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a base case in recursion?

The condition that stops the recursion
The initial call to a recursive function
The part of the function that calls itself
The final output of the recursive function

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the recursive case in a function do?

It calls the function itself, reducing the problem size
It initializes the variables used in recursion
It provides the condition to stop recursion
It returns the final result of the recursion

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct representation of the factorial of 5?

5 × 4 × 3 × 2 × 1
5 + 4 + 3 + 2 + 1
5! = 5 + 4 + 3 + 2 + 1
5 = 5 × 4 × 3 × 2 × 1

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the Fibonacci sequence?

A sequence where each number is the sum of the two preceding ones
A sequence where each number is the product of the two preceding ones
A sequence of prime numbers
A sequence of even numbers

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a stack overflow?

An error due to excessive function calls without reaching a base case
An error caused by too many variables in a function
An error due to incorrect loop conditions
An error caused by too many conditional statements

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of tracing recursive calls?

To understand how the recursive algorithm progresses and reaches the base case
To debug loop conditions
To initialize the variables used in recursion
To provide the final result of the recursion

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?