AP Computer Science Principles Exam Review

0.0(0)
studied byStudied by 9 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/16

flashcard set

Earn XP

Description and Tags

Flashcards reviewing key concepts from the AP Computer Science Principles exam notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

17 Terms

1
New cards

An expected user of the program is someone who watches Netflix and wants to find shows based on and .

genre, rating

2
New cards

The first iteration in New() runs once for each in the list.

item

3
New cards

An infinite loop could happen if you forget to increase the variable, like removing i++.

loop

4
New cards

Changing list[i] in the New() function to something like list[x], but x is never defined, will result in a error.

run-time

5
New cards

To count how many times a value appears in titleList, you should create a variable and set it to 0.

count

6
New cards

A comment at the top of the code explaining what the program does is an example of .

documentation

7
New cards

In the New() function, the loop runs as long as the input list has at least one .

item

8
New cards

filter("Comedy", "PG") calls the filter() procedure and tells it to find all shows that are both and -rated.

Comedy, PG

9
New cards

If you didn’t have a line like var titleList = getColumn("Netflix Content", "Title"), the app wouldn’t know what exist.

shows

10
New cards

Testing the app by trying different genres and ratings in the dropdowns is an example of using .

feedback

11
New cards

In New(), the loop uses i < list.length. A Boolean expression that’s equivalent is i != .

list.length

12
New cards

Instead of test cases, you can use output statements like inside the filter() function.

console.log()

13
New cards

The filter() function solves the of finding which titles match the selected genre and rating.

subproblem

14
New cards

The program solves the issue of too many choices on Netflix by letting users quickly narrow down shows by and .

genre, rating

15
New cards

The function builds a new list of only the matching results.

filter()

16
New cards

Inside the if statement in filter(), adding would tell you which shows matched the filter and were added to the list.

console.log(titleList[i])

17
New cards

If the parameter is removed from filter(), the code would only check for genre.

rating