AP Computer Science Principles - Algorithms and Programming

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

1/29

flashcard set

Earn XP

Description and Tags

AP Computer Science Principles - Flashcards for Big Idea 3: Algorithms and Programming

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

What is an algorithm?

A set of steps to do a task.

2
New cards

In computer science, what are algorithms used for?

To solve a problem or complete a task.

3
New cards

What is data abstraction?

Information hiding, bundling related program variables together to think of data hierarchically.

4
New cards

What is an example of data abstraction?

A list, which is a data type that holds a collection of values.

5
New cards

What are variables?

Placeholders for values a program needs to use.

6
New cards

What are strings?

Text fields that are a series of characters denoted with quotation marks.

7
New cards

What is the assignment operator used for?

To assign a value to a variable.

8
New cards

What are expressions?

Calculations to be evaluated to an answer or single value.

9
New cards

What are Boolean values?

Values that can only be true or false.

10
New cards

Name the three types of program statements?

Sequential, Selection, and Iterative

11
New cards

What are iterative statements also referred to as?

Repetitive statements or loops.

12
New cards

What is a nested conditional?

An IF statement within another set of IF statements.

13
New cards

What are Lists?

A collection of items

14
New cards

What are individual items in a list called?

Elements

15
New cards

How are elements accessed?

By position using an index in square brackets [index]

16
New cards

What does the APPEND command do?

Adds a new element to the end of the list.

17
New cards

What does the REMOVE command do?

Deletes the element at the provided index position and shifts the remaining elements one position to the left.

18
New cards

What is traversing a list?

A loop that will automatically repeat the code for each element in the list.

19
New cards

What does searching deal with?

Finding the needed element from everything in the dataset or determining that it is not there.

20
New cards

What is a linear search?

Checking each individual record, starting at the beginning and going to the end, one after the other in order to either find the desired data or to determine it is not in the dataset.

21
New cards

Why are binary searches more efficient than linear searches?

The binary search is considered a “divide and conquer” algorithm because it divides the dataset into two equal parts.

22
New cards

What are procedures also called?

Functions in some programming languages.

23
New cards

What is procedural abstraction?

You only need to know the name of the procedure, the number and type of parameters, and the output to expect.

24
New cards

Why are random number generator programs useful?

Mainly in designing games.

25
New cards

What is DISPLAY()?

A built-in procedure used for this course on the exam.

26
New cards

What is INPUT()?

Accepts data from the user, usually from the keyboard.

27
New cards

What does API stand for?

Application Programming Interface.

28
New cards

What are simulations designed for?

To represent and mirror the real world for testing.

29
New cards

What does the efficiency of algorithms deal with?

Resources needed to run it in terms of how long it will take and how much memory will be needed.

30
New cards

What is an undecidable problem?

Does not have an algorithm that can give a correct “yes” or “no” for all cases of the problem.