Consider the above code segment that is designed to print all numbers from a list of integer values, called grades, that are between 90 and 100, inclusive. Which modifications can be made to the code to allow it to also print numbers from a variety of different ranges of values (e.g., 70 to 80, 85 to 95, 1 to 50, etc.)?
APCSP Unit 2 Review

Flashcard
•
Computers
•
9th - 12th Grade
•
Hard
Quizizz Content
FREE Resource
Student preview

36 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Back
userPassword = "swordfish"
2.
FLASHCARD QUESTION
Front
Consider the above code segments designed to find the area of a triangle (A = 1/2 bh). Which of the following statements about the above programs is true? Both programs will work as intended, but Program B is more readable. Program A will work as intended, but Program B will not work as intended. Program B will work as intended, but Program A will not work as intended. Neither program will work as intended.
Back
Both programs will work as intended, but Program B is more readable.
3.
FLASHCARD QUESTION
Front
Given the above code segment, what would be displayed if age were initialized with a value of 18? Options: group 1, group 2, group 1 group 2, Nothing will be displayed
Back
group 2
4.
FLASHCARD QUESTION
Front
What condition will make the above an infinite loop? Options: y = -108, y≠-3, y ≥ 8, y < -53
Back
y ≥ 8
5.
FLASHCARD QUESTION
Front
The volume of a rectangular prism is calculated by multiplying its length, width and height. What could be substituted into the section of the code marked
Back
l * w * h
6.
FLASHCARD QUESTION
Front
What value does the above code segment display?
Back
53
7.
FLASHCARD QUESTION
Front
Consider the above procedure. Which of the following best describes the behavior of the find procedure? Options: Displays the position of the first occurrence of target in list, Displays the positions of all occurrences of target in list, Displays the position of the last occurrence of target in list, Displays each item in list that is equal to target
Back
Displays the positions of all occurrences of target in list
Create a free account and access millions of resources
Similar Resources on Quizizz
28 questions
Quarter 4 Practice 1

Flashcard
•
9th - 12th Grade
31 questions
HTML Web Design Review

Flashcard
•
9th - 12th Grade
30 questions
HTML Intro

Flashcard
•
9th - 12th Grade
32 questions
Domain1-5

Flashcard
•
9th - 12th Grade
31 questions
AP CSP - Unit 4 Code.org Review

Flashcard
•
9th - 12th Grade
33 questions
021125 P1 Codesters Vocabulary

Flashcard
•
9th - 12th Grade
28 questions
AP Computer Science Principles Units 1-3

Flashcard
•
9th - 12th Grade
28 questions
Quarter 4 Practice 1

Flashcard
•
9th - 12th 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
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

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

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

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

Quiz
•
KG - University