APCSP Semester 2 Midterm (UC Scout)

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

1/29

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.

30 Terms

1
New cards

What is the purpose of a loop in Python?

To repeat a block of code

2
New cards

Which of the following is the correct way to define a function in Python?

def myFunc()

3
New cards

What data type is used to store a sequence of characters in Python?

string

4
New cards

Which control structure is used to execute code based on a condition?

if statement

5
New cards

What is the output of the following code? x = 5 y = 10 print(x + y)

15

6
New cards

What does it mean to "debug" a program?

To find and fix errors in the code

7
New cards

Which of the following is NOT a valid variable name in Python?

2var

8
New cards

What is the purpose of the "return" statement in a function?

To send a value back to the caller

9
New cards

Which of the following loops will run indefinitely if not stopped?

while True:

10
New cards

What is the correct way to comment a single line in Python?

# This is a comment

11
New cards

What is pseudocode?

A high-level description of an algorithm

12
New cards

Why is pseudocode useful in program development?

It helps plan the logic before writing code

13
New cards

Which of the following is a benefit of collaborating on a programming project?

It allows for division of tasks and diverse perspectives

14
New cards

What does it mean to "satisfy personal curiosity" in the context of program development?

Writing code to solve a problem you're interested in

15
New cards

Which of the following is an example of a logical error in a program?

A mistake in the algorithm that produces incorrect results

16
New cards

What is the first step in the software development process?

Defining the problem

17
New cards

In pseudocode, what does the keyword "IF" typically represent?

A conditional statement

18
New cards

Which of the following is a correct pseudocode statement for assigning a value to a variable?

All of the above

19
New cards

What is the purpose of testing a program?

To ensure the program works as expected

20
New cards

Which of the following best describes an algorithm?

A step-by-step procedure to solve a problem

21
New cards

What is the primary purpose of the Internet?

To connect computers and share information globally

22
New cards

Which of the following best describes a network?

A group of interconnected computers

23
New cards

What is a protocol in the context of the Internet?

A set of rules for data communication

24
New cards

Which protocol is commonly used for sending emails?

SMTP

25
New cards

What does "fault tolerance" mean in computing systems?

The ability to continue functioning despite failures

26
New cards

Which of the following is an example of parallel computing?

Dividing a task into smaller parts and processing them simultaneously

27
New cards

What is the role of a router in a network?

To direct data packets between networks

28
New cards

Which of the following is a key characteristic of distributed computing?

Multiple computers work together to solve a problem

29
New cards

What does "HTTP" stand for?

HyperText Transfer Protocol

30
New cards

Which of the following best describes a "packet" in networking?

A small unit of data transmitted over a network