Search Header Logo

unit 3-4 ap comp sci

Authored by Jocelyn Mathew

Computers

9th - 12th Grade

Used 4+ times

unit 3-4 ap comp sci
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A programmer wants to determine whether a score is within 10 points of a given target. For example, if the target is 50, then the scores 40, 44, 50, 58, and 60 are all within 10 points of the target, while 38 and 61 are not.Which of the following Boolean expressions will evaluate to true if and only if score is within 10 points of target ?

(score ≤ target + 10) AND (target + 10 ≤ score)

(target + 10 ≤ score) AND (score ≤ target - 10)

(score ≤ target - 10) AND (score ≤ target + 10)

(target - 10 ≤ score) AND (score ≤ target + 10)

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following are benefits of using well-named variables in a computer program?

The program will run faster.

The program will be easier for people to read.

The program will have a greater data storage capacity.

The program will be easier to modify in the future.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A student is writing a program to model different real-world events using simulations. Which of the following simulations will generate a result that would best be stored using a Boolean variable?


A simulation of flipping a fair coin

A simulation of rolling a fair die (with sides numbered 1 through 6)

A simulation of the temperature in a location over time

A simulation of traffic patterns on a road

4.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

The following spinner is used in a game. The region labeled "blue" represents of the spinner. The regions labeled "orange" and "purple" are equal in size.

Media Image
Media Image
Media Image
Media Image

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The following procedure is intended to return true if at least two of the three parameters are equal in value and is intended to return false otherwise.

For which of the following procedure calls does the procedure NOT return the intended value?


AnyPairs ("bat", "cat", "rat")

AnyPairs ("bat", "bat", "rat")

AnyPairs ("bat", "cat", "bat")

AnyPairs ("bat", "cat", "cat")

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the following spinner, which is used to determine how pieces are to be moved on a game board. The region labeled "Move 1 space" is six times as large as each of the other two regions Which of the following code segments can be used to simulate the behavior of the spinner?

Media Image
Media Image
Media Image
Media Image

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In a certain science experiment, percent of trials are expected to be successful and  percent of trials are expected to be unsuccessful. The program below is intended to simulate the results of repeated trials of the experiment. Which of the following can be used to replace  so that the simulation works as intended?

Media Image
Media Image
Media Image
Media Image

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?