
Subroutines and Functions Activity

Quiz
•
Computers
•
10th Grade
•
Hard
JackR JackR
Used 1+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What are the two types of subroutines used in programming?
Variables and Constants
Functions and Procedures
Arrays and Strings
Loops and Conditions
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
How many parameters can functions and procedures have?
One or many
Two or three
One or two
Zero or one
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Explain the difference between local and global variables.
Local variables can be changed once declared, while global variables cannot be changed once declared.
Global variables keep a subroutine self-contained, while local variables can be used in any program without variable names conflicting.
Global variables are accessible anywhere in the program, while local variables are only accessible within the subroutine in which they were created.
Local variables are accessible anywhere in the program, while global variables are only accessible within the subroutine in which they were created.
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What are three reasons that you should try to use subroutines where possible?
To make the program more complex, to increase development time, and to make program maintenance harder.
To reuse code, to make the code less maintainable, and to make the program more difficult to understand.
To reuse code, to decompose the program into smaller units, and to make the code more maintainable.
To increase development time, to make the code less readable, and to make the program less efficient.
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What type of data structure is 'heights' in the function 'calcmax'?
Array
String
Integer
Boolean
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What is the output from the function 'sum(5, 3)'?
3
15
5
8
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What is one other advantage of using subroutines?
Subroutines can be stored in a subroutine library and used in different programs if required
To make the program less efficient
To make program maintenance harder
To make the program more complex
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
AQA GCSE Computer Science - 3.2.10 Subroutines

Quiz
•
8th - 10th Grade
20 questions
AQA GCSE Computer Science - 3.2.11 Structured programming

Quiz
•
8th - 10th Grade
15 questions
Subroutine

Quiz
•
10th Grade
16 questions
SST Yr8 - NCCE - Algorithms

Quiz
•
9th - 12th Grade
17 questions
Flowcharts and Actuators

Quiz
•
7th - 10th Grade
12 questions
Computer Science

Quiz
•
3rd - 12th Grade
20 questions
Programming

Quiz
•
9th - 11th Grade
20 questions
Computer Science

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
Discover more resources for Computers
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
10 questions
Characteristics of Life

Quiz
•
9th - 10th Grade
10 questions
Essential Lab Safety Practices

Interactive video
•
6th - 10th Grade
62 questions
Spanish Speaking Countries, Capitals, and Locations

Quiz
•
9th - 12th Grade
20 questions
First Day of School

Quiz
•
6th - 12th Grade
21 questions
Arithmetic Sequences

Quiz
•
9th - 12th Grade