AEM 249 Lecture 15

AEM 249 Lecture 15

University

7 Qs

quiz-placeholder

Similar activities

Differentiate between different type of MC Devices

Differentiate between different type of MC Devices

University

11 Qs

A Brief Introduction to Object-Oriented Programming (OOP)

A Brief Introduction to Object-Oriented Programming (OOP)

University

6 Qs

Q1 Responsi DAA B

Q1 Responsi DAA B

University

2 Qs

Primitive Recursive Function

Primitive Recursive Function

University

10 Qs

Enumeration and Recursion

Enumeration and Recursion

11th Grade - University

12 Qs

Recursion

Recursion

10th Grade - University

6 Qs

Analysis of Algorithms

Analysis of Algorithms

University

10 Qs

Latihan Rekursif

Latihan Rekursif

University

12 Qs

AEM 249 Lecture 15

AEM 249 Lecture 15

Assessment

Quiz

Computers

University

Easy

Created by

Markeith Diamond

Used 7+ times

FREE Resource

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a recursive function?

A function that calls another function

A function that has no else statement

A function that has no base case

A function that calls itself

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the base case in a recursive function?

The else statement containing recursive function calls

The if statement referring to the end of the recursion

The statement where the function calls itself

The first statement in the function

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the depth of a function?

The number of if/else statements in a function

The number of recursive calls made to a function

The number of parameters in a function

The number of print statements in a function

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the else statement in a recursive function?

To contain the base case

To end the recursion

To print the final result

To contain recursive function calls

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the if statement in a recursive function?

To print the final result

To end the recursion

To contain the base case

To contain recursive function calls

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the count parameter in count_down function?

To determine the depth of the function

To determine the base case

To determine the number of recursive calls

To determine the output of the function

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the print statement in count_down function?

To determine the base case

To contain recursive function calls

To end the recursion

To print the final result