
CP M.7 Functions Assessment Review
Authored by Marcia Bernas
Computers
9th - 12th Grade
Used 11+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why do we use functions?
To stop the program from repeating.
To test for true and false.
To simplify code.
To ask the user for input.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The _____________ go above the _____________ in the source code file
main program, return
main program, functions
subprograms, main program
def, functions
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Does the following code return a string or a number?
def f():
return "3"
string
number
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
It is necessary to do something to the value returned by a function; otherwise the value will not be stored in memory and will be lost.
True
False
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A variable used to send information to a function.
return
Parameter
Tracing code
def
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
We call the central part of the program the ______________ program
main
def
sub
return
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following parameters is optional?
sample ( a, b, c, d = 121)
a
d
c
b
Answer explanation
d has a default value (121) and thus is optional
Access all questions and much more by creating a free account
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
Already have an account?