zuai-logo
zuai-logo
  1. AP Computer Science Principles
FlashcardFlashcard
Study GuideStudy GuideQuestion BankQuestion Bank

What are the differences between a library and an API?

Library: A collection of pre-written code. | API: Specifies how to use the library's functions.

Flip to see [answer/question]
Flip to see [answer/question]
Revise later
SpaceTo flip
If confident

All Flashcards

What are the differences between a library and an API?

Library: A collection of pre-written code. | API: Specifies how to use the library's functions.

What are the differences between sequence and iteration control structures?

Sequence: Executes instructions in order. | Iteration: Repeats a block of code multiple times.

What are the differences between lists and dictionaries?

Lists: Ordered collection of items, accessed by index. | Dictionaries: Collection of key-value pairs, accessed by key.

What are the differences between integers and floats?

Integers: Whole numbers without decimal places. | Floats: Numbers with decimal places.

What are the differences between the for and while loops?

for loop: Iterates over a sequence of elements. | while loop: Iterates as long as a condition is true.

What are the differences between testing and debugging?

Testing: Verifies if the program meets requirements. | Debugging: Identifies and fixes errors in the code.

What are the differences between data abstraction and data representation?

Data Abstraction: Hides complex implementation details. | Data Representation: Defines how data is stored and manipulated.

What are the differences between positive and negative impacts of computing?

Positive Impacts: Advancements in various fields, improved efficiency. | Negative Impacts: Job displacement, privacy concerns, digital divide.

What are the differences between procedural and object-oriented programming?

Procedural: Focuses on procedures and functions. | Object-Oriented: Focuses on objects with data and methods.

What are the differences between local and global variables?

Local: Defined within a function, accessible only in that function. | Global: Defined outside functions, accessible throughout the program.

How is the random library applied in real-world scenarios?

Generating random numbers for simulations, games, cryptography, and statistical sampling.

How is data abstraction applied in real-world scenarios?

Operating systems hide complex hardware interactions, providing a simplified user interface.

How are control structures applied in real-world scenarios?

Traffic light systems use selection (if/else) to control traffic flow based on sensor data.

How are APIs applied in real-world scenarios?

Social media platforms provide APIs for developers to integrate their applications with the platform's data and functionality.

How is cybersecurity applied in real-world scenarios?

Banks use encryption and multi-factor authentication to protect customer data and prevent unauthorized access to accounts.

How is data representation applied in real-world scenarios?

Images are represented as arrays of pixel values to be displayed on screens.

How is algorithm design applied in real-world scenarios?

Search engines use complex algorithms to rank web pages based on relevance and other factors.

How is the math library applied in real-world scenarios?

Engineering simulations use mathematical functions to model physical phenomena.

How is the concept of the digital divide relevant in education?

Students without access to computers and the internet at home may face disadvantages in completing assignments and accessing online resources.

How are data structures applied in real-world scenarios?

Social networks use graph data structures to represent relationships between users.

What is a module?

A pre-written block of code containing functions and procedures that can be imported into a program.

What is a software library?

A collection of pre-built procedures and functions that perform specific tasks, saving development time and effort.

What is an API?

Application Program Interface. A set of rules and specifications that define how software components should interact, providing instructions on how to use a library's procedures.

What is data abstraction?

Hiding complex implementation details and exposing only essential information to the user, simplifying interaction with complex systems.

What is the digital divide?

The unequal access to technology and the internet based on socioeconomic factors, geography, or other demographic variables.

What is cybersecurity?

The practice of protecting computer systems and networks from unauthorized access, theft, damage, or disruption.

What is an integer data type?

A data type that represents whole numbers without any fractional or decimal parts.

What is a float data type?

A data type that represents numbers with fractional or decimal parts.

What is a string data type?

A data type that represents a sequence of characters, typically used to store text.

What is a boolean data type?

A data type that represents logical values, either true or false.