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

What is an IP address?

A unique address for every device on the internet.

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

All Flashcards

What is an IP address?

A unique address for every device on the internet.

What is DNS?

Domain Name System: translates domain names to IP addresses.

What is TCP/IP?

The fundamental communication protocol suite for the internet.

What is encryption?

Scrambling data to make it unreadable without a decryption key.

What is a firewall?

A security system that monitors and controls network traffic.

What is malware?

Harmful software that can damage your computer or steal data.

What is phishing?

Tricking users into revealing personal information via fake emails/websites.

What is a primitive data type?

Basic data types: integers, floats, booleans, characters.

What is an algorithm?

A step-by-step procedure for solving a problem.

What is data abstraction?

Hiding complex implementation details and showing only essential information.

What does the following code output?

python
strawberries_in_fridge = 7
number_of_eggs = 12

if strawberries_in_fridge >= 7:
    print ("You can make strawberry shortcake!")
    if number_of_eggs < 12:
        print ("... if you go to the store first.")
    else:
        print ("So start baking!")

You can make strawberry shortcake! So start baking!

What does the following code output?

python
x = 5
if x > 10:
    print("x is greater than 10")
elif x > 3:
    print("x is greater than 3")
else:
    print("x is not greater than 3")

x is greater than 3

What does the following code output?

python
my_list = [1, 5, 2, 8]
my_list.sort()
print(my_list)

[1, 2, 5, 8]

What does the following code output?

python
def greet(name):
    return "Hello, " + name + "!"

print(greet("World"))

Hello, World!

What does the following code output?

python
for i in range(3):
    print(i)

0 1 2

What does the following code output?

python
x = 10
while x > 0:
    print(x)
    x -= 2

10 8 6 4 2

What does the following code output?

python
def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n-1)

print(factorial(5))

120

What does the following code output?

python
my_dict = {"name": "Alice", "age": 30}
print(my_dict["age"])

30

What does the following code output?

python
print(2 ** 3)

8

What does the following code output?

python
print("Hello".replace("l", "p"))

Heppo

What is the role of routers?

Direct packets to their correct destination on the internet.

What is the purpose of HTTPS?

Secure transfer of web pages, using encryption to protect data.

Explain linear time complexity.

Time increases linearly with input size, denoted as O(n).

Explain logarithmic time complexity.

Time increases logarithmically with input size, denoted as O(log n).

Explain quadratic time complexity.

Time increases quadratically with input size, denoted as O(n^2).

Describe the concept of modularity in programming.

Breaking down a program into smaller, manageable functions.

What are logic errors in programming?

Mistakes in the program's logic, like incorrect conditions or infinite loops.

What are syntax errors in programming?

Mistakes in the code's grammar, like typos or missing punctuation.

What is the purpose of nested conditionals?

Allows for more complex decision-making based on multiple conditions.

What are some ethical considerations in computing?

Bias in algorithms, data privacy, and responsible technology use.