Search Header Logo

Subroutines Quiz

Authored by B G

Computers

9th Grade

Used 6+ times

Subroutines Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a subroutine?

A) A type of variable

B) A block of code that performs a specific task and can be reused

C) An error in programming

D) A command that halts the program

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following describes a function in programming?

A) A sequence of actions to perform input/output.

B) A subroutine that returns a value.

C) A method for declaring variables.

D) A procedure that does not return anything.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following best describes a procedure?

A) A subroutine that returns a value

B) A subroutine that does not return a value

C) A special variable used to hold data

D) A method of storing data

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you declare a function in Python?

A) function myFunction()

B) def myFunction[]

C) def myFunction():

D) myFunction():

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In programming, what does the term 'parameters' refer to?

A) Values returned by the function

B) Special commands within the program

C) The inputs that a function can accept

D) The outcome of a procedure

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does it mean to 'call' a function?

A) To create a new variable

B) To send data to the function for processing

C) To execute the function and perform its instructions

D) To define a new subroutine

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement is true about functions and procedures?

A) Functions can take input but procedures cannot

B) Procedures can return values whereas functions cannot

C) Functions always return a value, while procedures do not

D) There is no difference between them

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?