CS Unit 5: Functions and Subroutines

CS Unit 5: Functions and Subroutines

12th Grade

14 Qs

quiz-placeholder

Similar activities

Programming year 9

Programming year 9

9th - 12th Grade

16 Qs

Python: Functions and Parameters

Python: Functions and Parameters

9th - 12th Grade

10 Qs

Thinking Ahead

Thinking Ahead

12th Grade

10 Qs

Lesson 3: (CIW JavaScript)

Lesson 3: (CIW JavaScript)

9th - 12th Grade

11 Qs

2.2.1 Variables and Functions

2.2.1 Variables and Functions

12th Grade

10 Qs

PBO

PBO

12th Grade

15 Qs

CodeHS 3.1 - 3.3

CodeHS 3.1 - 3.3

9th - 12th Grade

12 Qs

Recursion Quiz (CP 2)

Recursion Quiz (CP 2)

10th - 12th Grade

15 Qs

CS Unit 5: Functions and Subroutines

CS Unit 5: Functions and Subroutines

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Ahmed Abdallah

Used 1+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an advantage of using subroutines?

Faster execution time

Limited code organization

Easier to reuse code

Easier to spot errors

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the difference between a function and a procedure?

Functions are faster than procedures

Procedures return values, functions do not

Functions return values, procedures do not

Procedures are used for input only

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a function do in a program?

Handle user input errors

Execute a specific set of commands

Print statements to the console

Calculate or process a value

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens when the return line is executed in a function?

Function terminates and returns a value

Function continues executing code

Function prints a message to the console

Function restarts from the beginning

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the main benefit of using functions in programming?

Code obfuscation

Code duplication

Code complexity

Code reusability

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of an argument in a function?

Values returned by the function

Values passed into the function

Values printed to the console

Values stored in memory

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the significance of using trace tables in functions?

Investigate function behavior

Handle user input errors

Terminate the program

Print messages to the console

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?

Discover more resources for Computers