No student devices needed. Know more
20 questions
What is an argument?
A variable passed as a value to a function
A variable passed in from outside the function
What is an parameter?
A variable passed as a value to a function
A variable passed in from outside the function
What is the parameter of this
function quadrupleNumber(x){
var quadX = 4 * x;
println(quadX);
}
x
println
quadX
none
Why do we write functions?
Make our code easier to understand by giving a readable name to a group of instructions
Avoid writing repeated code
Make our code reusable
All of the above
It is very important to pass parameters to functions in the proper order
True
False
What are the parameters of the printNumbers function?
function printNumbers(first, second, third){
println(first);
println(second);
println(third);
}
first, second, third
x, y, z
println
rintNumbers
Which statement allows us to return values from functions?
break
if
return
function
These are any variable names listed within a function's argument definition.
example: myFunction(x, y)
Parameter
Literals
Constraints
Variables
How many return values come out of the function sum?
function sum(first, second){
var result = first + second;
return result;
}
0
1
2
3
A variable that can be used throughout a program, in every scope
global variable
local variable
scope
In what part of the program the variable exits
scope
global variable
return
parameter
In the following code snippet:
function addTen(x){
var ten = 10;
var result = x + ten;
return result
}
function double(x){
var result = 2*x;
return result;
}
x, result, and ten
x and result
only x
only result
A simplified representation of something more complex.
Sequencing
Pair Programming
Turtle Programming
Abstraction
Function
A problem solving approach in which you break down a system to gain insight into the sub-systems that make it up.
Top Down Design
API
Documentation
Hexadecimal
A collection of commands made available to a programmer.
Top Down Design
API
Documentation
Hexadecimal
Library
An extra piece of information passed to a function to customize it for a specific need.
Library
Parameter
For Loop
Loop
Coordinate System is using numbers as coordinates to place objects in a geometric space
True
False
Explore all questions with a free account