Midterm APCSP: Questions 1-2

Midterm APCSP: Questions 1-2

Assessment

Flashcard

Computers

12th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

10 questions

Show all answers

1.

FLASHCARD QUESTION

Front

Selection is best defined as:

Back

Determining whether or not a part of a program should run

2.

FLASHCARD QUESTION

Front

Which of the following logical operators return true if both of its operands are true? NOT, NOR, OR, AND

Back

AND

3.

FLASHCARD QUESTION

Front

What is the result of the expression 3 > 0 OR 3 < 0?

Back

True

4.

FLASHCARD QUESTION

Front

What are all of the possible outputs of RANDOM(2, 5)?

Back

2, 3, 4, or 5

5.

FLASHCARD QUESTION

Front

Consider the pseudocode shown in the diagram: result ← false; IF (X AND Y) THEN { IF (Z) THEN { result ← false } ELSE { result ← true } }. Which single expression assigned to result is equivalent to this block?

Media Image

Back

result ← (X AND Y) AND NOT(Z)

6.

FLASHCARD QUESTION

Front

A program generates value ← RANDOM(1, 100). It displays RED when value > 50. Otherwise, it displays GREEN if value ≤ X; else it displays BLUE. To simulate a spinner landing RED 50%, GREEN 25%, BLUE 25%, what should X be?

Media Image

Back

25

7.

FLASHCARD QUESTION

Front

Which pseudocode block correctly performs: add 5 to x, then multiply the result by 3? Consider the three blocks shown: I) x ← 3 ∗ (x + 5), II) x ← x + 5 ∗ 3, III) x ← x + 5; x ← x ∗ 3.

Media Image

Back

Blocks I and III match the described operation

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?