Which of the following is NOT a reason we use subprograms (functions)?
Alternate assignment: Unit 7 test

Quiz
•
Computers
•
8th Grade
•
Medium
CRYSTAL DEMOURA
Used 2+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
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
Create a free account and access millions of resources
Similar Resources on Quizizz
16 questions
Y8 Spring Assessment

Quiz
•
8th Grade
18 questions
Y9 L5 Functions

Quiz
•
8th Grade
17 questions
Python

Quiz
•
6th - 10th Grade
20 questions
Python Functions Quiz

Quiz
•
8th Grade
15 questions
Python Objective 2

Quiz
•
8th Grade
15 questions
PyGame Zero - 3

Quiz
•
7th - 8th Grade
15 questions
Hangman Game - Programming Questions

Quiz
•
7th - 11th Grade
15 questions
Coding Quiz

Quiz
•
6th - 10th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University
44 questions
El fin del año- 7th

Quiz
•
7th - 12th Grade
40 questions
Word Study Assessment: Roots, Prefixes, Suffixes, and Vocabulary

Quiz
•
8th Grade
17 questions
guess the logo

Quiz
•
8th Grade
16 questions
Function or Non-Function?

Quiz
•
8th - 10th Grade
15 questions
Sentence Fragments and Run-ons

Quiz
•
8th Grade