AP CSP BIG IDEA 3 - ALGORITHMS AND PROGRAMMING

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

1/39

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

40 Terms

1
New cards

Algorithm

Set of steps to solve a problem or complete a task.

2
New cards

API (Application Program Interface)

Contains specifications for how the procedures in a library behave and can be used.

3
New cards

Argument

The actual input expression supplied to a function or procedure in the call statement.

4
New cards

Arithmetic Operators

+, -, *, /, %

5
New cards

Assignment Statement

To assign a value to a variable

6
New cards

Binary Search

Considered a "divide and conquer" algorithm because it divides the dataset into two equal parts. Feedback about whether the value in question is higher or lower than the midpoint of the list determines which half to discard and which half to continue searching. The dividing and searching steps are repeated until the value is found or determined to not be in the list.

7
New cards

Boolean Values

Can only represent the values true or false.

8
New cards

Clarity

How easy it is to understand.

9
New cards

Concatenation

Attaching two things side-by-side, frequently strings.

10
New cards

Condition

Certain requirements that need to be met in order for selection statements to run.

11
New cards

Data Abstraction

Simplifies a set of data by representing it in some general way. You can then work with that representation instead of each piece of data itself.

12
New cards

Decidable Problem

One where an algorithm can be written that results in a correct "yes" or "no" answer for all inputs.

13
New cards

Decision Problem

A problem that has a yes or no answer

14
New cards

Efficiency

The efficiency of algorithms deals with the resources needed to run it in terms of how long it will take and how much memory will be needed. This becomes especially important with extremely large datasets, and efficiency is usually stated in terms of the size of the input. While the time will vary based on the computer used, general rules are used to determine the efficiency of these algorithms.

15
New cards

Element

An individual value in a list.

16
New cards

Expression

A statement that returns only one value.

17
New cards

Heuristic

Some problems can't be solved in a reasonable amount of time. In this case, computers turn to an approximate solution.

18
New cards

Iterative

Also called loops, and they repeat themselves over and over until the condition for stopping is met.

19
New cards

Library

Contains already-developed procedures that you can use in creating your own programs.

20
New cards

Linear Search

Also called a sequential search algorithm, and it checks each value of a list in order until the result is found.

21
New cards

Lists

A collection of items such as integers and strings.

22
New cards

Logical Operators

Known as NOT, AND and OR. These can be used to combine multiple conditions

23
New cards

Modularity

When you divide a computer program into separate sub-programs

24
New cards

Modulus

Modulus math uses division, but only provides the remainder as the answer, not the quotient.

25
New cards

Optimization Problem

Asks what the best solution is to the task at hand.

26
New cards

Parameter

The input variables of a procedure.

27
New cards

Procedural Abstraction

The details of how a procedure works are abstracted away. You only need to know the name of the procedure, the number and type of parameters, and the output to expect.

28
New cards

Procedure

A group of programming instructions. They're also known as methods or functions, depending on the programming language. You can use a procedure to use the same set of instructions, again and again, without having to rewrite it into your code.

29
New cards

Pseudocode

A simplified programming language.

30
New cards

Readability

To help programmers understand a program by writing clear and understandable names.

31
New cards

Relational Operators

Used with Boolean values to test the relationship between two values. ==, !=, >, <, >=, <=

32
New cards

RETURN Statement

1. To end a function before the end of the procedure is reached.

2. To send a value back to the calling program.

33
New cards

Selection Statement

Process primarily takes the form of conditional statements known as if statements.

34
New cards

Sequential Statement

Consists of steps in your algorithm that are implemented in the order they're written in. Once you execute one statement, you go on to the next one.

35
New cards

Simulation

Designed to represent and mirror the real world for testing.

36
New cards

String

Text fields that are just a series of characters and are denoted with quotation marks around the text field.

37
New cards

Substring

Section of strings.

38
New cards

Traverse

Go through, a list

39
New cards

Undecidable Problem

Does not have an algorithm that can give a correct "yes" or "no" for all cases of the problem. An algorithm may work for some cases, but not all.

40
New cards

Variable

Placeholders for values a program needs to use.