Quarter 3 Final Exam: Functions and Parameters
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Medium
Njemele Bush
Used 32+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why do we write functions?
I. Make our code easier to understand by giving a readable name to a group of instructions
II. Avoid writing repeated code
III. Make our code reusable
II and III
I only
I and II
I, II, and III
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
In the following function printThreeTimes:
function printThreeTimes(word){
println(word);
println(word);
println(word);
}
What is the parameter of the function?
printThreeTimes
function
word
println
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following program?
function start(){
var x = 5;
sumTo(x);
println(x);
}
function sumTo(num){
var sum = 0;
for(var i = 0; i <= num; i++){
sum += i;
}
println(sum);
}
5
15
15
5
5
15
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How many parameters go into the function sum, and how many return values come out of the function sum?
function sum(first, second, third){
var result = first + second + third;
println(first);
println(second);
println(third);
return result;
}
3 parameters go in, 1 return value comes out
3 parameters go in, 3 return values come out
1 parameter goes in, 4 return values come out
1 parameter goes in, 1 return value comes out
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What is printed by the following program?
function product(x, y){
return x * y;
}
function difference(x, y){
return x - y;
}
function start(){
var x = 2;
var y = 5;
var value1 = product(x, y);
var value2 = difference(y, x);
var result = difference(value1, value2);
println(result);
}
-7
7
13
-13
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
True or false: Functions should have parameters.
True
False
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which statement allows us to return values from functions?
break
return
while
function
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
21 questions
CPA MS-Office Hotkeys Quiz
Quiz
•
8th Grade - Professio...
18 questions
Quiz on Misinformation and Bias
Quiz
•
10th Grade - University
20 questions
Ինֆորմատիկա 10 II կիսամյակի ամփոփիչ աշխատանք
Quiz
•
10th - 12th Grade
15 questions
Начала программирования на языке Паскаль
Quiz
•
8th - 11th Grade
19 questions
Python Year 9 Quiz
Quiz
•
8th - 10th Grade
20 questions
Online Platform Block Q
Quiz
•
11th - 12th Grade
15 questions
Chapter 3: Storage devices and media (Part 2):
Quiz
•
10th - 11th Grade
20 questions
City & Guilds Award in Business Processes
Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
