What is a subroutine?

48. AQA GCSE (8525) SLR8 – 3.2 Introduction to subroutines

Quiz
•
Computers
•
11th Grade
•
Hard

James Cole
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A debugging tool
A type of programming language
A block of code with a unique identifiable name within a program
A unique identifiable name within a program
Answer explanation
A subroutine is a block of code with a unique identifiable name within a program, allowing for modular and reusable code segments.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why are subroutines used?
To make programs run faster
To increase the size of the code
To break down a big problem into smaller, manageable problems
To make the program harder to test
Answer explanation
Subroutines are used to break down a big problem into smaller, manageable problems, making the code more organized and easier to maintain.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are the benefits of using subroutines?
Makes it easier to code, test, debug, and reuse code
Increases the need to duplicate code
Slows down development
Makes the code harder to maintain
Answer explanation
Using subroutines makes it easier to code, test, debug, and reuse code, leading to more efficient development processes.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you identify a subroutine in a program?
By the comments within the code
By the number of lines in the code
By the use of keywords 'procedure' or 'function'
By the program's title
Answer explanation
The correct way to identify a subroutine in a program is by the use of keywords 'procedure' or 'function'. These keywords indicate the presence of a separate block of code that can be called upon.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a procedure call?
A method to end the program
A call to another procedure within a program
A type of error in programming
A request to access a website
Answer explanation
A procedure call is a call to another procedure within a program, allowing the program to execute the code within that procedure.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens when a subroutine is called?
The program pauses for user input
The program ends
The program jumps to the code inside the subroutine and executes it
The program deletes the subroutine
Answer explanation
When a subroutine is called, the program jumps to the code inside the subroutine and executes it, then returns to the point where the subroutine was called.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is typically contained in the main program when using subroutines?
Only variable declarations
Some logic and calls to subroutines
Only comments
All the code of the program
Answer explanation
The main program when using subroutines typically contains some logic and calls to subroutines, not just variable declarations or comments.
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Global and local variables

Quiz
•
10th - 12th Grade
10 questions
Understanding Decomposition in Computing

Quiz
•
10th Grade - University
20 questions
Very Basic Programming

Quiz
•
10th - 12th Grade
13 questions
S:R3 Structured Approach to Program Design and Construction Quiz

Quiz
•
11th Grade
17 questions
Programming Languages H&L

Quiz
•
9th - 12th Grade
16 questions
For and While Loops in Python

Quiz
•
9th - 12th Grade
20 questions
Subroutines - Procedures & Functions

Quiz
•
9th - 12th Grade
20 questions
A-level Subroutine

Quiz
•
11th Grade
Popular Resources on Quizizz
10 questions
Chains by Laurie Halse Anderson Chapters 1-3 Quiz

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
15 questions
Character Analysis

Quiz
•
4th Grade
12 questions
Multiplying Fractions

Quiz
•
6th Grade
30 questions
Biology Regents Review #1

Quiz
•
9th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
Discover more resources for Computers
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
14 questions
Attributes of Linear Functions

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University
50 questions
Biology Regents Review 2: Ecology

Quiz
•
9th - 12th Grade
20 questions
Investing

Quiz
•
9th - 12th Grade