big idea 3: algorithms and programming - ap csp flashcards ੈ✩‧₊˚

5.0(1)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/14

flashcard set

Earn XP

Description and Tags

all info from barrons book!

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

15 Terms

1
New cards

what is an abstraction in computer science

a way to represent essential features without including the background details/explanations; generalization

2
New cards

what are variables

they vary; you can assign values for the variable to represent, which can change based on how it is used in your algorithm/program

3
New cards

what is an algorithm

a set of tasks or instructions, like a recipe

4
New cards

how does MOD work (modulus)

it returns the REMAINDER between two integers

ex. 3 MOD 2 = 1, 4 MOD 2 = 0

note: if the dividend is LESS than the divisor, then the output will be the dividend value

ex. 3 MOD 4 = 3

5
New cards

what is a list

a type of data abstraction, reduces the complexity of a program by having multiple values in a single variable

index positions start at 1

note: in other programming languages, like python, the index position starts at 0

6
New cards

what are boolean operators

operators that determine the relationship between two variables, expressions, or values

ex. =, >, <, etc.

7
New cards

true AND true results in…

true

8
New cards

true AND false results in…

false

9
New cards

true OR true results in….

true

10
New cards

true OR false results in….

true

11
New cards

false OR false results in…

false

12
New cards

false AND false results in…

false

13
New cards

what is a linear search

an algorithm looks for an element in a list SEQUENTIALLY or beginning to end

14
New cards

what is a binary search

an algorithm looks for an element in a list by halving the number of elements that need to be searched after every comparison

note: list MUST be sorted, whether it is from ascending to descending or the opposite

note #2: for lists with text, binary search can be used if the lists’ elements are sorted in alphabetical order, or ascending to descending in alphabetical order

15
New cards

what are procedures

a set of code that is referred to by a NAME and can be called at any point in a program by using the procedure name