Functions With Parameters and Returns

Functions With Parameters and Returns

9th - 12th Grade

20 Qs

quiz-placeholder

Similar activities

JavaScript Functions and Parameters

JavaScript Functions and Parameters

9th - 12th Grade

20 Qs

CodeHS Functions and Return Values

CodeHS Functions and Return Values

9th - 12th Grade

15 Qs

CodeHS AP CSP Unit 3 Review

CodeHS AP CSP Unit 3 Review

11th - 12th Grade

22 Qs

Java Script Quiz

Java Script Quiz

9th - 12th Grade

15 Qs

JavaScript and Graphics

JavaScript and Graphics

9th - 12th Grade

15 Qs

IST CodeHS Unit 8 JavaScript Review

IST CodeHS Unit 8 JavaScript Review

9th - 12th Grade

22 Qs

STATIC KEYWORD IN JAVA

STATIC KEYWORD IN JAVA

9th - 12th Grade

18 Qs

Arithmetic Types Declare Initialize Relation Logical Ops

Arithmetic Types Declare Initialize Relation Logical Ops

9th Grade - University

16 Qs

Functions With Parameters and Returns

Functions With Parameters and Returns

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Barbara White

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an argument?

A variable passed as a value to a function

A variable passed in from outside the function

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an parameter?

A variable passed as a value to a function

A variable passed in from outside the function

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the parameter of this

function quadrupleNumber(x){

var quadX = 4 * x;

println(quadX);

}

x

println

quadX

none

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

It is very important to pass parameters to functions in the proper order

True

False

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which statement allows us to return values from functions?

break

if

return

function

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?