AP Computer Science Principles

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

1/230

flashcard set

Earn XP

Description and Tags

Study Guide

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

231 Terms

1
New cards

What is the focus of Big Idea 1 in AP Computer Science Principles?

Creative development, which emphasizes programming as a collaborative and creative process that brings ideas to life through software development.

2
New cards

What is a computing innovation?

A computing innovation uses a computer program to take in data, transform it, and output data.

3
New cards

What are the benefits of collaboration in programming?

Collaboration allows for the exchange of ideas, multiple perspectives for improvement, clarification of misunderstandings, development of thinking skills, increased student responsibility, and elimination of bias.

4
New cards

What is pair programming?

Pair programming is when two programmers develop software side-by-side at one computer on the same algorithm.

5
New cards

What is a user interface?

The inputs and outputs that allow a user to interact with a piece of software.

6
New cards

What is the significance of meaningful names in programming?

Meaningful names help in understanding the purpose of elements within the code.

7
New cards

What is the difference between input and output in programming?

Input is data sent to a computer for processing, while output is data sent from a program to a device.

8
New cards

What is a program?

A program is a collection of instructions that a computing device executes.

9
New cards

What are code segments?

Code segments are smaller collections of statements that are part of a program.

10
New cards

What is a program event?

A program event refers to an action or occurrence within a computer program that triggers specific actions or behaviors.

11
New cards

What is an event-driven program?

An event-driven program responds to events triggered by user actions, system events, or other sources.

12
New cards

What is a sequential program?

A sequential program executes instructions in a specific order.

13
New cards

What is the iterative development process?

The iterative development process involves developing working prototypes and revisiting stages of the development method.

14
New cards

What is the incremental development process?

The incremental development process breaks a program into smaller pieces and ensures each piece works before adding it to the whole.

15
New cards

What is program documentation?

Program documentation describes how something in your program works and is crucial for understanding and fostering collaboration.

16
New cards

What is the most common form of program documentation?

Comments written directly into the program.

17
New cards

What is a library in programming?

A library is a collection of functions that can be used in different programs.

18
New cards

What is an Application Program Interface (API)?

An API provides information on how each function works, a complete list of parameters, and what is returned.

19
New cards

What is a syntax error?

A syntax error occurs when the spelling and/or punctuation rules of the programming language aren't followed, such as forgetting to close parentheses.

20
New cards

What is a logic error?

A logic error is a mistake in a program's base logic that causes unexpected behavior.

21
New cards

What is a run-time error?

A run-time error occurs when the program is running.

22
New cards

What is an example of a logic error in programming?

A program that incorrectly prints multiple messages due to flawed conditional statements, such as printing 'You got an A', 'You got a B', and 'You got a C' when only one should be printed.

23
New cards

What happens when you try to divide by zero in a program?

The program crashes because the operation is undefined.

24
New cards

What is an Overflow Error?

An error that occurs when a computer tries to handle a number outside its defined range of values.

25
New cards

What is debugging?

The process of finding and fixing errors in a program.

26
New cards

What is data?

A collection of facts.

27
New cards

What is a number base?

The number of digits or digit combinations that a system uses to represent values.

28
New cards

What is the decimal system?

A number system with a base of 10, using combinations of 0-9 to represent values.

29
New cards

What does the binary system use to represent numbers?

Only combinations of 0 and 1.

30
New cards

What are bits?

The smallest unit of information stored or manipulated on a computer, represented as 0 or 1.

31
New cards

How many bits are in a byte?

8 bits.

32
New cards

What is the significance of 8 bits?

8 bits can represent 256 unique combinations.

33
New cards

What is analog data?

Data that is measured continuously and changes smoothly, like the volume of music.

34
New cards

What is digital data?

Data that is measured at discrete intervals and can be stored on digital media.

35
New cards

What is sampling in the context of data?

Recording an analog signal at regular discrete moments and converting it to digital signals.

36
New cards

What is data abstraction?

Filtering out specific details to focus on the information needed to process data.

37
New cards

How do you calculate the largest value representable with n bits?

Use the formula 2^n - 1.

38
New cards

What is data compression?

A set of steps for packing data into a smaller space while allowing for the original data to be seen.

39
New cards

What is the purpose of data compression?

To save disk space or reduce bandwidth.

40
New cards

What is run length encoding?

A method that replaces repeating data with a run that represents the number and value of the repeated data.

41
New cards

What is lossless data compression?

A method that reduces file size without sacrificing any of the original data.

42
New cards

What are two key components of data compression?

An encoding algorithm that generates a compressed representation and a decoding algorithm that reconstructs the original message.

43
New cards

What is an example of lossless data compression?

Run length encoding.

44
New cards

What is the largest numerical value you can represent with 7 bits?

255, calculated as 2^8 - 1.

45
New cards

What is the total number of values representable with 8 bits?

256, since it counts from 0 to 255.

46
New cards

What is the main purpose of inverting pixel colors and brightness values in data compression?

To reconstruct the original message exactly from the compressed message.

47
New cards

What type of data compression allows for exact reconstruction of the original data?

Lossless data compression.

48
New cards

What is lossy data compression?

A method that sacrifices some data to achieve greater compression, resulting in an approximation of the original message.

49
New cards

What are common uses for lossy data compression?

Mainly used for images and sound.

50
New cards

What happens to some original pixels or sound waves in lossy compression?

They are removed forever.

51
New cards

What is the relationship between the amount of compression and the size of the resulting file in lossy compression?

As the amount of compression increases, the size of the resulting file decreases.

52
New cards

What does the term 'metadata' refer to?

Data about data that does not affect the primary data itself.

53
New cards

What is the purpose of metadata?

To help find and organize data.

54
New cards

What challenges do large data sets pose?

The need to clean data, incomplete data, invalid data, and the need to combine data sources.

55
New cards

What is data mining?

The process of examining very large data sets to find useful information such as patterns.

56
New cards

What is the difference between correlation and causation?

Correlation refers to the statistical relationship between variables, while causation indicates that one variable directly affects another.

57
New cards

What is a scatter plot used for?

To represent values for two different numeric variables and compare their correlation.

58
New cards

What does a bar chart represent?

Categorical data with rectangular bars proportional to the values they represent.

59
New cards

What is a histogram used for?

To represent frequency and ranges of data using bars.

60
New cards

What is an example of data transformation?

Modifying every element of a data set, such as multiplying numbers by a constant value.

61
New cards

What is the significance of cleaning data?

It creates a uniform data set, making analysis more reliable.

62
New cards

What is the role of programs like spreadsheets in data analysis?

They help efficiently organize and find trends in information.

63
New cards

What does it mean if a correlation coefficient is close to 1?

It indicates a strong positive correlation between the variables.

64
New cards

What is the difference between strong and weak correlations?

Strong correlations are closer to 1 or -1, while weak correlations are closer to 0.

65
New cards

What is an example of a non-arithmetic data transformation?

Adding a grade level or class rank to a list of student records.

66
New cards

What is the importance of data visualization tools?

They help in representing data graphically, making it easier to understand patterns and trends.

67
New cards

What does a line graph represent?

Values over time or continuous data, using lines to connect data points.

68
New cards

What is a key takeaway about the relationship between data size and processing?

Large data sets may require parallel systems for processing due to their complexity.

69
New cards

What does the phrase 'fewer bits does not necessarily mean less information' imply?

The amount of data reduction does not always correlate with the information content.

70
New cards

What is a variable in programming?

A variable is a placeholder in your program for a value, usually represented by letters or words.

71
New cards

How can values be assigned to variables?

Values can be assigned to variables through the assignment operator.

72
New cards

What is the difference between a global variable and a local variable?

A global variable can be used anywhere and is defined outside of an event, while a local variable is used only within the part of the code it was created and is deleted once the event is done.

73
New cards

Provide an example of a global variable.

Example: var clicks = 0; Onevent ('button', 'click') clicks = clicks + 1.

74
New cards

Provide an example of a local variable.

Example: onEvent('button', 'click') var clicks = 1.

75
New cards

What is the recommendation regarding local variables?

Avoid local variables; create variables once, at the top of the code, outside of events and functions.

76
New cards

How many data values can a variable hold at a time?

Each variable can only hold one data value at a time, but it can be reassigned.

77
New cards

What is a string in programming?

A string is a sequence of characters represented by quotation marks.

78
New cards

What is a substring?

A substring is part of an existing string.

79
New cards

How can two strings be concatenated?

The + operator can be used to join or concatenate two strings or a number.

80
New cards

What is a list in programming?

A list is an ordered sequence of elements, also known as an array.

81
New cards

What are the two values a boolean can represent?

A boolean can represent either true or false.

82
New cards

What is the purpose of the NOT operator?

The NOT operator reverses the evaluation of a condition; if true, it becomes false, and vice versa.

83
New cards

What does the AND operator do?

The AND operator combines two conditions and evaluates to true only if both conditions are met.

84
New cards

What does the OR operator do?

The OR operator evaluates to true if at least one of the two conditions is met.

85
New cards

What are nested conditionals?

Nested conditionals are conditional statements inside other conditional statements.

86
New cards

What is an element in a list?

An element is an individual value in a list, assigned an index value.

87
New cards

How do index numbers work in lists?

Index numbers start at 1.

88
New cards

What is data abstraction?

Data abstraction simplifies a set of data by representing it in a general way, focusing on the main aspects.

89
New cards

How can you access an element in a list?

You can access an element by its index number.

90
New cards

What is the purpose of assigning the value of an element of a list to a variable?

This allows you to assign a variable to a certain element within a list.

91
New cards

What is the output of the code that replaces the third element of grocery_list with 'soap'?

The output is ['milk', 'eggs', 'soap'].

92
New cards

How do you assign the value of one element in a list to another element?

You can assign the value by using the index of the elements, e.g., grocery_list[0] = grocery_list[2].

93
New cards

What happens when you insert an element at a specific index in a list?

The element is added at the specified index, and all subsequent elements are shifted down by one position.

94
New cards

What is the purpose of appending elements to a list?

Appending adds values to the end of the list, increasing its length.

95
New cards

What does removing an element from a list do?

It eliminates the element at the specified index and shifts all subsequent elements up.

96
New cards

How can you determine the length of a list?

You can use the len() function to determine the length of a list.

97
New cards

What is a linear search?

A linear search checks each element of a list in order until the desired value is found or all elements have been checked.

98
New cards

How does a binary search work?

A binary search starts in the middle of a sorted list and eliminates half of the data based on the search criteria, repeating until the desired value is found.

99
New cards

What is required for a binary search to function correctly?

The list must be sorted.

100
New cards

What is a procedure in programming?

A procedure is a group of programming instructions that can be reused without rewriting the code.