wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

AP CSP 200PT Quizizz 1-29

Total questions: 74

Worksheet time: 50mins

Name
Class
Date
1.

What is the difference between loops and conditionals?

(a)  

2.

"If there is a bee"

The statement above is a loop.

a)

True

b)

False

3.

The purple code is

a)

conditional

b)

loop

4.

The picture represents conditionals

a)

True

b)

False

5.

"If path is to the right"


The statement above is an example of a conditional.

a)

True

b)

False

6.

"Repeat until" is an example of a loop

a)

True

b)

False

7.

What is a loop?

(a)  

8.

You can repeat conditionals by placing the conditionals inside of repeat.

a)

True

b)

False

9.

The picture shows an example of

a)

conditionals

b)

loops

10.

The picture shows

a)

Conditionals

b)

loops

11.

Which word means the same as "repeat".

a)

Iterate

b)

program

c)

loop

d)

for loop

12.

Is used to repeat a specific block of code an unknown number of times, until a condition is met.

a)

Iteration

b)

Infinite Loop

c)

For Loop

d)

While Loop

13.

Is used to repeat a specific block of code a known number of times.

a)

Iteration

b)

Infinite Loop

c)

For Loop

d)

While Loop

14.

Read each scenario. In which would a loop be most helpful?

a)

Maura wants a program to perform a math operation one time.

b)

Jamila is programming a robot to hop once and then raise its arm once.

c)

Vinny wants a program to go through a list of 35 of his friends and remind each friend what time a study group starts.

d)

Damian is writing a program that will tell him what to wear depending on the weather.

15.

adds one to variable x in a loop

a)

increment (x)

b)

x++;

c)

x=x;

d)

y+1;

16.

How many times will the following program print "hello"?

a)

10

b)

11

c)

9

d)

This code will loop infinitely

17.

What is wrong with this loop?

a)

Nothing, it works

b)

moveForward is not a command

c)

The value of the variable is 0

d)

It never ends

18.

We want to simulate constantly flipping a coin until we get 3 heads in a row. What kind of loop should we use?

a)

For loop

b)

While loop

c)

Loop and a half

d)

Infinite loop

19.

OUTPUT?

var i = 1;

while (i < 5) {

System.out.println("Hello");

i++;

}

a)

Hello

Hello

Hello

Hello

Hello

b)

Hello

Hello

Hello

Hello

c)

Hello

Hello

Hello

d)

Hello

20.

What is the final sum after this loop executes

a)

sum = 5

b)

sum = 10

c)

sum = 15

21.

What are the values of count1 and count2 as a result of executing the code segment?

a)

count1 = 2, count2 = 2

b)

count1 = 2, count2 = 3

c)

count1 = 3, count2 = 2

d)

count1 = 5, count2 = 0

22.

What will be displayed in the console when the following program runs?

a)

0 2 4 6

b)

0 2 4

c)

2 4 6

d)

The program will result in an infinite loop

23.

What number will be output by the console.log command on line 7?

a)

50

b)

100

c)

200

d)

300

24.

Conditional Statement

a)

affects the sequence of statements followed in a program by executing different statements based on the value of a Boolean expression

b)

is a statement that always executes regardless of conditions

c)

is used to declare variables in a program

d)

is a type of loop that repeats a block of code

25.

What will the value of the variable bags be at the end of the flowchart shown here?

a)

2

b)

3

c)

4

d)

5

26.

A concert hall charges different ticket prices based on the customer's age. The prices are shown in the table below.
Age Ticket Price
12 and younger $10
13 to 64 $15
65 and older $5
The customer's age is stored in the variable age and the price is stored in the variable price. Which piece of code will correctly decide the price for each ticket?

a)

if (age <= 12) price = 10; else if (age >= 13 && age <= 64) price = 15; else price = 5;

b)

if (age < 12) price = 10; else if (age < 65) price = 15; else price = 5;

c)

if (age <= 12) price = 15; else if (age <= 64) price = 10; else price = 5;

d)

if (age < 13) price = 5; else if (age < 65) price = 10; else price = 15;

27.

What will the value of the variable bags be at the end of the flowchart shown here?

a)

1

b)

2

c)

3

d)

4

28.

What number will be output by the console.log command on line 5?

a)

40

b)

41

c)

42

d)

43

29.

What will the value of the variable bags be at the end of the flowchart shown here?

a)

1

b)

2

c)

3

d)

4

30.

What will the value of the variable bags be at the end of the flowchart shown here?

a)

0

b)

1

c)

2

d)

3

31.

What text will be output by the program? Options: Be super careful, Think about it, Hey calm down, Do what you want

a)

Be super careful

b)

Think about it

c)

Hey calm down

d)

Do what you want

32.

What text will be output by the program? Options: Be super careful, Think about it, Hey calm down, Do what you want

a)

Be super careful

b)

Think about it

c)

Hey calm down

d)

Do what you want

33.

What text will be output by the program? Options: A, B, C, D, E

a)

A

b)

B

c)

C

d)

D

34.

What text will be output by the program? Options: Be super careful, Think about it, Hey calm down, Do what you want

a)

Be super careful

b)

Think about it

c)

Hey calm down

d)

Do what you want

35.

What will be the order of numbers printed to the console when this program is run? Options: 123, 123123, 12323, 1231321

a)

123

b)

123123

c)

12323

d)

1231321

36.

What line is responsible for the error in the statement "You are a cat@#@$!!!" never displays?

a)

1

b)

2

c)

3

d)

4

37.

What text will be output by the program? A, B, C, D, E

a)

A

b)

B

c)

C

d)

D

38.

What number will be output by the console.log command on line 7? Options: 50, 100, 200, 300

a)

50

b)

100

c)

200

d)

300

39.

What number will be output by the console.log command on line 5? Options: 10, 15, 20, 25

a)

10

b)

15

c)

20

d)

25

40.
Consider these three statements: I. Interviewing potential users of the app. II. Writing the entire program code before testing any parts of it. III. Observing users attempting to use the app. Which of the above actions would usually be helpful in designing and developing the app?
a)
I and II only
b)
I and III only
c)
II and III only
d)
I, II, and III
e)
None of these would usually be helpful
41.
Which of the following best describes the purpose of a design specification?
a)
Tracking errors that arise through user testing
b)
Documenting comments that will need to be added to a program
c)
Describing the requirements for how a program will work or users will interact with it
d)
Listing detailed questions that will be asked of users during interviews
42.

What will the “background-color” of the “bottomButton” be when the program is finished running?

a)
red
b)
orange
c)
blue
d)
green
43.

If the user DOES click the button what color will “topButton” be when this program finishes running?

a)
red
b)
blue
c)
green
d)
orange
44.

The following program is run. The user DOES NOT click the "topButton" button. What will be displayed in the console?

a)
cat bird dog
b)

cat dog

c)
cat dog bird
d)

dog cat

45.

The following program is run. Then the user clicks the “bottomButton” TWICE and DOES NOT click the “topButton”. What will be displayed in the console?

a)
cow pig chicken
b)

chicken cow cow

c)

chicken pig pig

d)
chicken pig cow
e)

bow chicka wow wow

46.
The following program is run. Then the user clicks the “bottomButton” TWO TIMES. What will be displayed in the console?
a)
apple banana cherry cherry dragon fruit
b)
banana dragon fruit cherry cherry
c)
banana dragon fruit apple apple
d)
banana cherry cherry dragon fruit
e)
chicken chicken chicken chicken chicken chicken chicken chicken chicken
47.
Which line of code in this program is MOST likely to result in an error?
a)
Line 1
b)
Line 2
c)
Line 3
d)
Line 4
e)
chicken chicken chicken chicken chicken chicken chicken chicken chicken
48.
Which of the following BEST describes the differences between sequential and event-driven programming? A) In sequential, commands run one at a time. In event-driven, all commands run at the same time. B) In sequential, commands run in the order they are written. In event-driven, some commands run in response to user interactions or other events. C) In sequential, each command is run many times in sequence. In event-driven, all commands are run a single time as an event. D) In sequential, commands run faster than in event-driven programming.
a)
A
b)
B
c)
C
d)
D
49.
Which of the following is NOT a reason to include comments in programs?
a)
Comments help the computer decide whether certain components of a program are important.
b)
Comments help programmers debug issues in their own code
c)
Comments help document how code was written for other programmers to use
d)
Comments enable programmers to track their work throughout the development process
50.
A company that develops apps wants to create/assemble a team of collaborative developers/coders from a variety of professional and cultural backgrounds to create a new app. Which of the following is NOT a likely benefit of creating such a team?
a)
It will eliminate the need to do testing of the app.
b)
It can help the team anticipate the needs of a variety of users.
c)
It can help the team avoid bias in the app.
d)
The team can reflect and utilize the strengths of the individual team members.
51.
a)
A
b)
B
c)
C
d)
D
52.
Which of the following actions are generally helpful in program development?
a)
I and II only
b)
I and III only
c)
II and III only
d)
I, II, and III
53.
Which of the following is needed for DineOutHelper to recommend a restaurant for the group? (Select ALL that apply.)
a)
Each group member's list of food allergies or dietary restrictions.
b)
Alejandra's geographic location.
c)
The usernames of the people in Brandon and Cynthia's contact lists.
54.
Which of the following is not provided by Alejandra but is necessary for DineOutHelper to recommend a restaurant for the group? (Select ALL that apply.)
a)
Brandon's contact list.
b)
Information about which restaurants Brandon and Cynthia have visited in the past.
c)
Information about which food allergies and dietary restrictions can be accommodated at different restaurants near Alejandra.
55.
Three students in different locations are collaborating on the development of an application. Which of the following stratagies is LEAST likely to faciliate collaboration among the students?
a)
A
b)
B
c)
C
d)
D
56.
a)
A
b)
B
c)
C
d)
D
57.
a)
A
b)
B
c)
C
d)
D
58.

What is the User Interface

a)

Elements of which the user controls

b)

Elements of which the coder controls

c)

An interface with code

d)

An interface with options

59.

An error in a program that prevents the program from running as expected

a)

onEvent

b)

Bug

c)

Moth

d)

Fly in the Ointment

60.

Which of the following best describes how computing devices represent information?

a)

A computer will either represent information as bits or bytes but not both

b)

A computer represents data as a byte which is either a 0 or a 1

c)

A computer represents data as bits which is either a 0 or a 1

d)

A computer represents information as bits which contain 8 bytes.

61.

Which of the following is NOT true of how computers represent complex information?

a)

Computing devices use patterns of bits to represent complex information

b)

Abstraction helps represent complex information by surfacing complexity that might otherwise be hidden

c)

Depending on context the same sequence of bits may represent different types of information

d)

Common abstractions that are represented by computing devices include numbers, characters, and color.

62.

When visiting a museum Lian takes a photo of a painting with a smartphone which stores the photo as an image file. Which of the following best describes the differences between the painting itself and the photo of the painting stored on the smartphone?

a)

Both the painting and the photo are analog

b)

The photo is a digital representation of the analog painting

c)

Sampling can be used to determine whether the analog image is an accurate representation of the painting

d)

The phone can represent the photo in either digital or analog formats depending on the sampling technique that is used

63.


Your computer uses 4 bits to represent decimal numbers (0, 1, 2, 3 and so on) in binary. What is the SMALLEST number for which an overflow error occur?

a)

14

b)

15

c)

16

d)

17

64.


Which of the following is true of how computers represent numbers?

a)

Using a fixed but large number of bits can eliminate the possibility of round off error when representing numbers in binary

b)

With a fixed number of bits some numbers are too large to represent in a computer which will lead to overflow errors.

c)

Using a fixed but large number of bits, for example 128, eliminates the possibility of overflow errors.

d)

With a large but fixed number of bits it is possible to eliminate either round-off errors or overflow errors, but not both.

65.


Convert the binary (base-2) number 1001 to decimal (base-10).

a)

9

b)

10

c)

16

d)

17

66.

Convert the decimal (base-10) number 20 to binary (base-2).

a)

10010

b)

00101

c)

11000

d)

10100

67.

Which of the following binary (base-2) numbers is LARGEST?

a)

11000000

b)

01111111

c)

00000001

d)

10111111

68.


How many total numbers can be represented with an 8-bit binary (base-2) system?

a)

127

b)

128

c)

255

d)

256

69.

Which of the following is true of lossy and lossless compression algorithms?

a)

Lossy compression algorithms are used when perfect reconstruction of the original data is important.

b)

Lossy compression algorithms are typically better than lossless compression algorithms at reducing the number of bits needed to represent a piece of data.

c)

Lossless compression algorithms are only used to compress text data.

d)

Lossless compression algorithms only allow for an approximate reconstruction of the original data.

70.

Jorge is sending a large image file to a friend as part of a shared classroom project. Which of the following is most likely true if Jorge opts to compress the image before sending it?

a)

The image can no longer be represented using bits.

b)

The image will have been converted into an analog form.

c)

The image will require more pixels to display it on the screen.

d)

The image will require fewer bits in order to be represented.

71.

Which of the following is true of intellectual property?

a)

Information created on a computer is not owned by anyone since only analog information is protected under copyright law.

b)

You do not need to cite work created by someone else if both the original work and your use of it are in digital form.

c)

Creative Commons enables content creators to freely distribute their otherwise copyrighted work.

d)

Creative Commons has severely hindered broad and open access to digital information

72.


Lucy is completing a project as part of a science class using materials she found online. Which of the following is MOST LIKELY to lead to legal consequences?

a)

Modifying a piece of open source software.

b)

Using open access research for which she does not acquire a license.

c)

Failing to publish her work under a Creative Commons license.

d)

Using images posted online by another student without permission or citation.

73.

Ryan is designing an app that needs to quickly send low quality photos between users. Most smartphones take much higher quality photos than Ryan needs for his app. Which answer best describes the type of compression Ryan should choose and why?

a)

Lossless compression since it ensures perfect reconstruction of the photo.

b)

Lossy compression since it ensures perfect reconstruction of the photo.

c)

Lossless compression since it typically results in smaller data sizes.

d)

Lossy compression since it typically results in smaller data sizes.

74.


Arman takes a picture with his smartphone which he subsequently posts online. Beatrice finds the picture online and posts a copy of it on her website with an attached Creative Commons license. Which of the following best describes who owns the photo?

a)

Beatrice owns the photo because only holders of a Creative Commons license can own works online.

b)

Arman owns the photo because he was the original creator and did not license the work.

c)

Arman owns the photo because it was granted a Creative Commons license by another person online.

d)

Both own the photo because creating a copy makes it her intellectual property.