Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science Final '24

Total questions: 10

Worksheet time: 9mins

Name
Class
Date
1.
6. The following program is run. Then the user clicks the “bottomButton” ONCE and then clicks the “topButton” ONCE. What will be displayed in the console?
a)
A. cow pig chicken
b)
B. cow chicken pig
c)
C. pig cow chicken
d)
D. chicken pig cow
2.
8. Which line of code in this program is MOST likely to result in an error?
a)
A. Line 1
b)
B. Line 2
c)
C. Line 3
d)
D. Line 4
3.

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

a)

10

b)

100

c)

20

d)

200

4.

Which of the following is true of functions?

a)

Programs written with functions run more quickly

b)

Functions can help remove repeated code from a program

c)

Replacing repeated code with a function will reduce the number of commands the computer needs to run

d)

Functions are called once but can be declared many times

5.

The mayor of a city is interested in learning what goals are most important for residents of the city. Members of her staff visit one of the many neighborhoods in the city and ask 20 residents to fill out a survey. The mayor is concerned that the survey may be biased and not accurately reflect the overall interests in her town. Which of the following strategies is MOST likely to address concerns about the data being biased or inaccurate

a)

Finding the same people surveyed previously to ask more detailed questions.

b)

Visiting the same neighborhood to collect more survey responses

c)

Visiting multiple new neighborhoods to collect more survey responses

d)

Having her staff collect the data using an app rather than paper surveys

e)

Adding more staff to verify that the responses were accurate

6.

Understanding of the life cycle of a program is an essential component to becoming an effective programmer. Which of the following is the best example of how the life cycle of a program should work?

a)

Idea→algorithm→write code→execute code→maintain→debug

b)

Idea→write code→algorithm→execute code→debug→maintain

c)

Idea→algorithm→write code→debug→execute code→maintain

d)

Idea→algorithm→write code→execute code→debug→maintain

7.

7.  Which of the following is true of how the Internet has responded to the increasing number of devices now using the network?

a)

A. The Internet protocols are changed every year to adapt to the new devices that have been connected to the network

b)

B. While the number of devices connected to the Internet has grown, the network itself has not grown

c)

C. The protocols of the Internet were designed to scale as new devices are added

d)

D. The protocols of the Internet are no longer necessary thanks to the large number of devices now connected to the network

8.

8. Emilee is watching an online video. The video is being sent to her laptop by a server over the Internet which splits the video into packets and sends them in the order they appear in the video. Which of the following is true about how the packets will arrive at her computer?

a)

A. The packets will always be received in the order that they were sent

b)

B. Either every packet will reach her computer or none of them will.

c)

C. Packets that arrive out of order will be sent back to the server.

d)

D. The packets may arrive out of order

9.

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

a)

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

b)

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

c)

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

d)

D. A computer represents information as bits which contain 8 bytes

10.

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

a)

A. 11000000

b)

B. 01111111

c)

C. 00000001

d)

D. 10111111