
Alternate assignment: Unit 7 test
Authored by CRYSTAL DEMOURA
Computers
8th Grade
Used 2+ 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
3 mins • 1 pt
Which of the following is NOT a reason we use subprograms (functions)?
For code that will be reused
To test for true and false relationships
To simplify code
To help us organize longer programs
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which of the following parameters is optional?
sample (a, b, c, d = 121)
a
d
c
b
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Consider the following subprogram: def mult(a, b = 1, c = 1): print(a * b * c) What is output by: print(mult(3, -10))
0
31
-30
30
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
We call the central part of the program the __________ program.
main
def
sub
return
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Which of the following is NOT a subprogram?
random
input
randint
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Consider the following code:
def tryIt (an):
val = an * 2
c = 0
if (val < 0):
c = 1
return c
Which variable is the parameter?
val
c
an
0
Answer explanation
an - The parameter is the variable passed into the function in the parentheses when it is originally defined.
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Subprograms go __________ the main program.
outside
after
inside
above
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?
Similar Resources on Wayground
15 questions
Code.org Express Course Quiz 2
Quiz
•
6th - 8th Grade
22 questions
Steve Jobs
Quiz
•
6th - 12th Grade
20 questions
iMovie App Quiz
Quiz
•
6th - 12th Grade
20 questions
Letters
Quiz
•
6th - 8th Grade
20 questions
Productivity Programs
Quiz
•
6th - 8th Grade
16 questions
Programming and Logic Lesson 2
Quiz
•
6th - 8th Grade
18 questions
PC Component Identification
Quiz
•
6th - 12th Grade
20 questions
Technology Innovations
Quiz
•
5th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade