wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AP CS P 5.1

Total questions: 50

Worksheet time: 25mins

Name
Class
Date
1.

You won the lottery and elected to receive a lump sum! The largest number the bank’s computer can store is 23112^{31} - 1 , or 2,147,483,647. After depositing your lottery winnings of $2,500,000,000.00, what will the result be?

a)

Your winnings were more than the largest number the bank’s computers could hold, so an overflow error will occur.

b)

Since decimal numbers are stored imprecisely in computers, a rounding error will occur.

c)

The amount will be represented in machine code format, so converting it to decimal will show the balance in a more readable format.

d)

The amount will cause a runtime error.

2.

You stop by and purchase your favorite snack after school one day. You notice the cash register shows the change you are owed as: 0.04999999 0.04999999\ rather than 0.05. How is this possible?

a)

The cash register DISPLAY procedure has an error.

b)

A rounding error occurred.

c)

It’s displaying the change owed in a different currency.

d)

The amount is represented as a string field rather than a number.

3.

You are assigned a parking space in a large parking lot by an automated machine. You recognize that the parking space number is displayed in binary, but the parking spots are labeled in decimal numbers. Convert the parking space number 10011011 to decimal to know where to park and avoid getting towed.

a)

154

b)

155

c)

157

d)

9F

4.

When designing a web page, you see a color you want to use listed in binary as: 01010000, 11001000, 01111000. Which color is it, given the decimal equivalents (Red, Green, Blue)?

a)

(32, 76, 414)

b)

(50, 118, 78)

c)

(80, 200, 120)

d)

(128, 310, 170)

5.

Your bank asks for your phone number to associate it with your account. What is this an example of?

a)

A privacy concern

b)

Multifactor authentication

c)

A phishing attempt

d)

Asymmetric authentication

6.

You have to change a program written a year ago by someone else. A sample section of code is below. How could the original program author have helped anyone making changes at a later date? PROCEDURE A (x, y, z) IF x < y { x <- z }

a)

Provided the original program requirements

b)

Added a video describing the program design and functionality

c)

Used procedure and variable names that described their purpose and content

7.

Which statement is NOT true?

a)

Lower level languages are easier to debug because the language is closest to what the computer executes.

b)

Higher level languages are easier to debug because the language is closer to natural language.

c)

Lower level languages provide less abstraction.

d)

Higher level languages are easier for people to code in because they are more abstract.

8.

A simulation of conditions for a new sensor to be used with self-driving cars is being designed. The pseudocode for the test is below.

When car starts, turn sensor on and set incident_counter to 0 When detect object 3 feet or closer, redirect steering wheel away from object Add one to incident_counter

Which condition is not a useful simulation test for the sensor?

a)

Multiple obstacles at the same time.

b)

Zero incidents.

c)

Set up objects at 3 feet, less than 3 feet, and greater than 3 feet to determine the action taken.

d)

If the car causes an accident, by swerving.

9.

Which of the following will evaluate to "true"?

i. (true AND true) OR (true AND false)

ii. NOT(true OR false)

iii. NOT(false) AND NOT(true AND false)

a)

i and ii

b)

i and iii

c)

ii and iii

d)

i, ii, and iii

10.

What outcome will the Boolean conditions in the diagram produce at steps 1, 2, and 3?

a)

(C) 1—False, 2—True, 3—True

b)

(A) 1—True, 2—True, 3—False

c)

(B) 1—False, 2—False, 3—True

d)

(D) 1—True, 2—False, 3—False

11.

Susie’s mother wants a copy of a photo from a family vacation that Susie took. The picture is too large to e-mail. How should Susie compress the image if her mother wants to print a large copy of it suitable for framing?

a)

She should use a lossless compression technique, which will be needed to print a version with high enough quality to frame.

b)

She should use a lossy compression technique to obtain enough compression to send the image.

c)

They should be combined for the best compression technique.

d)

Any compression technique will be sufficient in this case.

12.

What describes the process of searching datasets for incomplete data records to process?

a)

Classifying

b)

Cleaning

c)

Clustering

d)

Filtering

13.

Given the table of data about car accidents, which outcome is supported by the data?

a)

Drivers ages 16–25 have the fewest accidents.

b)

More accidents occur on the weekdays.

c)

Drivers age 26–50 have fewer accidents than the other two age groups.

d)

Adult drivers have more accidents on weekdays during rush hour.

14.

Why do businesses and scientists attempt to analyze large datasets?

a)

To gain insights smaller subsets of data may not provide

b)

To confirm findings from smaller datasets

c)

To identify potential problems in the metadata

d)

To obtain economies of scale with hardware needed to store the data

15.

How do the World Wide Web and the Internet work together?

a)

They perform the same functionality.

b)

The Web uses HTTP to share computational artifacts using the Internet.

c)

The Internet uses the Web to connect devices to share data.

d)

The Internet has the “deep” net and “dark” net but the Web does not.

16.

If a fire occurs at a major Internet hub, what is the result?

a)

Internet traffic will be routed to its destination in a different way because of the redundancy built into the Internet.

b)

The part of the globe that is served by that Internet hub will be down because of the end-to-end architecture of the Internet.

c)

Different IP addresses will be assigned to devices that were impacted by the unavailability of the Internet hub.

d)

People can use dedicated phone lines as a backup with no change in service.

17.

The time it took to complete a task sequentially was 25 seconds. The time it took to complete the same task using a parallel computing model was 10 seconds. What is the speedup?

a)

2.5

b)

0.4

c)

15

d)

-15

18.

If a company is trying to determine whether to upgrade its bandwidth based on the following graph, what should they measure?

a)

Amount of data uploaded as it includes strategic company backup data

b)

Amount of data downloaded as it has the largest impact on the bandwidth

c)

Frequency of the peak times

d)

Number of devices used on the network

19.

You notice a file being uploaded every night to a site you are not familiar with. Opening the file, it looks like a file of your work from the day. This could be an example of a:

a)

computer virus

b)

keylogger file

c)

network worm

d)

phishing attack

20.

You are part of a team that created facial recognition software. However, you just learned an innocent person was taken into custody using only facial recognition software. What can the team do to remove any bias in the future?

a)

Create better training materials for interpreting the results

b)

Use photos of a more diverse population to train the algorithm for recognition

c)

Contact lawmakers to support regulation of the use of facial recognition software

d)

Add new members to the team to increase the diversity to better identify and avoid bias

21.

You make a compressed version of an old classic song to send to a friend. You notice that the sound quality is not as sharp as your version. What is the likely cause?

a)

The file was compressed with a lossy algorithm.

b)

The file was compressed with a lossless algorithm.

c)

The file was corrupted during the copying process.

d)

The file was copied from a digital version rather than the original analog version.

22.

Which of the following is true about packets?

a)

The receiving device acknowledges the first and last packets to indicate receipt of the data stream.

b)

Packets travel in order to their destination.

c)

Packets follow the shortest path to their destination.

d)

Packets are reassembled at their final destination.

23.

How do TCP and IP interact?

a)

IP forwards the data to the ISP to identify which TCP to use.

b)

TCP hands off control to HTTP, which passes it to IP.

c)

TCP creates packets from the data to be sent and transfers control to IP for routing. TCP then reassembles the packets at the destination.

d)

IP uses UDP in conjunction with TCP to securely send data.

24.

An e-mail goes out from your organization's payroll department to all employees stating that everyone needs to confirm or update their banking information to ensure paychecks are deposited on time. It turns out this was not an e-mail from the payroll department. It is most likely a:

a)

computer virus

b)

keylogger attack

c)

phishing attack

d)

malware insertion point

25.

You need to share a confidential file with another organization. You know the file needs to be encrypted to prevent unauthorized access to its contents. What is the best method of encryption to use?

a)

Certificate Authorities (CAs) to validate the security of the organization where you are sending the data

b)

Multifactor authentication to ensure multiple steps of security

c)

Public key encryption so you do not have to share the encryption key

d)

Symmetric key encryption so you each have the encryption and decryption keys

26.

What is a benefit of the government posting databases for public use?

a)

It is a way to identify the need for new policies and regulations.

b)

Consumers can learn more about how their individual data is being collected, stored, and used.

c)

Companies can opt out to prevent competitors from learning about their business.

d)

All businesses can access the data at no cost, aiding those businesses that would otherwise not have the resources to obtain the data on their own.

27.

Which algorithm will display the smallest number in a list of positive numbers? Assume max is a variable holding the largest number in the list.

a)

smallest ← -1

FOR EACH num IN list {

IF (smallest < num) { smallest ← num

}

}

DISPLAY (smallest)

b)

smallest ← list[i]

FOR Each num IN list {

IF (smallest > num) { smallest← num }

} DISPLAY (smallest

)

c)

smallest← -1

FOR EACH num IN list {

IF (smallest > num) { num ← smallest }

}

DISPLAY (smallest)

d)

smallest ← max

FOR EACH num IN list {

IF (smallest > num) {

smallest ← num }

} DISPLAY (smallest)

28.

Which of these is a Boolean expression?

a)

X ← 57

b)

Y ← temp * 120 / 100

c)

(temp > 32)

d)

72 + 12 - (12 * 6) -> z

29.

What can be determined from the following program flow?

Intro()

Rules()

Play()

Score()

DISPLAY (HighScore())

a)

A game is played by calling different procedures.

b)

An error will occur due to invalid procedure names.

c)

Parameters are missing from the procedures resulting in a runtime error.

d)

A compile time error occurs due to Score() and HighScore().

30.

Which statement’s format is incorrect?

a)

IF (NOT (x > y)) { DISPLAY(message) }

b)

x ← x + y

c)

list[i] ← list[j]

d)

ELSE DISPLAY(new message)

31.

Which algorithm should be used to find a phone number on a contact list?

I. Sort the contact list by name Search for the phone number using a binary search Display the correct phone number

II. Search for the phone number using a linear search Display the correct phone number

a)

I and II are equally effective.

b)

A combination of both I and II should be used.

32.

Why does a computer playing chess use a heuristic algorithm?

a)

It ensures the computer only wins a certain number of times making it a more enjoyable experience for people.

b)

It ensures humans only win a certain percentage based on statistics.

c)

It takes too long to analyze all possible moves, so the computer takes the next best move.

d)

It checks each possible combination of moves for the best move.

33.

You are determining the attributes for an AI (Artificial Intelligence) algorithm for a bank to use for approving customers for loans. You select age, income, employment status, and active-loan status as attributes to consider. The bank finds that very few new loans are being offered to college-educated individuals due to college loans. This is an example of bias in:

a)

analyzing the data

b)

collecting the data

c)

preparing the data

d)

reporting the data

34.

If a list named snacks contains the values:

snacks ← ["chocolate", "peanuts", "granola", "chips", "grapes"]

A variable place is assigned the value:

place ← LENGTH(snacks)

What will the value snacks[place] contain?

a)

5, the number of items in the list.

b)

6, the number of letters in the word "grapes."

c)

grapes, which is the value in the 5th position of the list.

d)

Error, a list cannot be accessed in this way.

35.

Will both of the following two blocks produce correct results? Assume all variables have been properly initialized.

a)

Only Block 1 is correct.

b)

Only Block 2 is correct.

c)

Both blocks are correct.

d)

Neither block is correct.

36.

What State Is Los Angeles In

a)

Texas

b)

New York

c)

North Carolina

d)

California

e)

Utah

37.

Which Countries Are Not In Europe

a)

France

b)

Germany

c)

Thailand

d)

China

e)

Italy

38.

What Is The Capital Of Canada

a)

Washington DC

b)

Ottawa

c)

Mexico City

39.

Which Country Is In The Nordic Region

a)

United Kingdom

b)

Norway

c)

Grenada

d)

Cuba

e)

Mongolia

40.

Which Countries Belong To Denmark

a)

China

b)

Faroe Islands

c)

Fiji

d)

Aland Islands

e)

Greenland

41.

What did Cinderella forget at the ball?

a)

A shoe

b)

Mice

c)

Keys to her house

d)

Dust-Pan

42.
What is the princesses name?
a)
Ariel
b)
Rapunzel
c)
Jasmine
d)
Belle
43.
What is the dog's name?
a)
Goofy
b)
Donald
c)
Pluto
d)
Minnie
44.
What is the snowman's name?
a)
Frosty
b)
Sven
c)
Olaf
d)
Hans
45.
Who is tigger's friend that is a donkey?
a)
Piglet
b)
Eeyore
c)
Roo
d)
Winnie the Pooh
46.

Who is the villain in the movie 'Sleeping Beauty'?

a)

Maleficent

b)

Ursula

c)

Aurora

d)

Cinderella

47.

Which Disney princess is friends with a talking teapot and candlestick?

a)

Cinderella

b)

Ariel

c)

Snow White

d)

Belle

48.

What country is in red?

a)

Germany

b)

France

c)

Spain

d)

Italy

49.
a)

Russia

b)

Armenia

c)

Thailand

d)

Kenia

50.
a)

Egypt

b)

Australia

c)

North Korea

d)

Nepal