wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Computer Science Principles Final Exam Review

Total questions: 50

Worksheet time: 28mins

Name
Class
Date
1.

Which of the following refers to a work that is not protected by copyright?

a)

Public domain

b)

Creative commons

c)

Fair use

d)

Royalty free

2.

Which of the following refers to a work that has copyright reserved but can still be copied?

a)

Creative commons

b)

Public domain

c)

Trademark

d)

Fair use

3.

Social media has only negative impacts on individuals.

a)

True

b)

False

4.

Which of the following HTML tags will give you the biggest text?

a)

<p>

b)

<h1>

c)

<h6>

d)

<a>

5.

What would the output of the following code be?

x = 10

x = 15

print("You have", x, "dogs")

a)

You have 10 dogs

b)

You have 15 dogs

c)

You have 1015 dogs

d)

You have 25 dogs

6.

What type of number is the following if condition checking for? (Assume I have an integer variable named "num")

if num MOD 2 == 0

print(num)

a)

Even numbers

b)

Odd numbers

c)

Positive numbers

d)

Floating-point numbers

7.

If the user enters 9, what would the value of the variable c be?

a = int(input("Please enter a number: "))

b = 10

c = a + b * 2

(a)  

8.

What is the decimal representation of the following binary number?

101101

(a)  

9.

Which of the following is a byte?

a)

1

b)

0010 1011

c)

1100 0101 1011

d)

1011

10.

Information is sent over the network in ___________

a)

Packets

b)

Links

c)

Packages

d)

Messages

11.

How many values can a binary digit store?

a)

Two values (0 or 1)

b)

Ten values (0-9)

c)

Sixteen values (0-F)

d)

Eight values (0-7)

12.

What will the output of the following bit of code be?

num = 8

num2 = 12

while num <= num2

num = num + 1

print(num)

a)

9, 10, 11, 12, 13

b)

9, 10, 11, 12

c)

8, 9, 10, 11, 12, 13

d)

8, 9, 10, 11, 12

13.

Select ALL examples of hardware

a)

CPU

b)

RAM

c)

Hard drive

d)

Google Chrome

e)

Windows

14.

Which tag should come very first in your HTML files?

a)

<!DOCTYPE html>

b)

<head>

c)

<html>

d)

<body>

15.

Which of the following would cause an infinite loop?

a)

count = 0

while count < 25

count = count + 1

b)

count = 25

while count > 0

count = count - 1

c)

count = 0

while count < 25

count = count - 1

d)

count = 25

while count < 50

count = count + 1

16.

What is the result of the following code?

first = True

second = False

if (not second) and first

print("True")

else

print("False")

a)

True

b)

False

17.

Which of the following error types would prevent your program from running?

a)

Runtime error

b)

Syntax error

c)

Logic error

18.

What is the process of fixing an error in a program?

a)

Debugging

b)

Compiling

c)

Interpreting

d)

Formatting

19.

If I wanted to store the value of Pi (3.14), what datatype would my variable need to be?

a)

Floating-point (float/double)

b)

boolean

c)

int

d)

string

20.

Which of the following compression types loses data in the compression process?

a)

Binary compression

b)

Lossless compression

c)

Lossy compression

d)

Huffman compression

21.

Which protocol do I want to make sure my browser is using when connecting to a website to be secure?

a)

HTTPS

b)

HTTP

c)

TCP

d)

FTP

22.

Which of the following is the LARGEST?

a)

petabyte

b)

gigabyte

c)

kilobyte

d)

megabyte

e)

terabyte

23.

Which of the following binary numbers is the biggest?

a)

1000 0001

b)

0111 1111

c)

1000 0010

d)

0010 0000

24.

Select all the INPUT devices

a)

Keyboard

b)

Mouse

c)

Webcam

d)

Monitor

e)

Speakers

25.

What is the binary representation of the decimal number 94

(a)  

26.

Which of the following statements executes a block of code if a condition is true?

a)

if

b)

function

c)

define

d)

import

27.

What would the result of the following code be if snow_day = True and weekend = False?

if weekend

print("Have a great weekend!")

else if snow_day

print("Back in my day we hiked uphill to school in 10 feet of snow")

else

print("It's school time!")

a)

Back in my day we hiked uphill to school in 10 feet of snow

b)

It's school time!

c)

Have a great weekend!

d)

"Back in my day we hiked uphill to school in 10 feet of snow"

AND

"It's school time!"

28.

What is the process of breaking large problems into smaller, more manageable ones?

a)

Top-down design

b)

Fractalization

c)

Outlining

d)

Task Simplification

29.

What will be the output of the following code?

a = 5

b = 3

c = a * b

print("The result is", c)

a)

The result is 8

b)

The result is 15

c)

The result is 53

d)

The result is 35

30.

What is the default value of a boolean variable in most programming languages?

a)

1

b)

0

c)

False

d)

True

31.

What will be the value of sum1 after this code runs?

a)

4

b)

1

c)

40

d)

10

32.

If we want to draw a circle using our helpful drawCircle function at position (200, 300) with a radius of 50 and color purple, which is the correct function call?

As a reminder, here's the function header for drawCircle:

function drawCircle(radius, color, x, y)

a)

drawCircle(200, 300, 50, Color.purple);

b)
  1. drawCircle(50, Color.purple, 200, 300);

c)
  1. drawCircle(200, 300, Color.purple, 50);

d)
  1. drawCircle(radius, color, x, y);

33.

Consider the following array:

var shoppingList = ["notebooks", "pencils", "calculator", "backpack", "markers"];

Which line of code will correctly change "markers" to "colored pencils"?

a)
  1. shoppingList["markers"] = "colored pencils";

b)
  1. shoppingList["colored pencils"] = "markers";

c)
  1. shoppingList[4] = "colored pencils";

d)
  1. shoppingList[5] = "colored pencils";

34.

Why do we compress data?

I. To save memory space on devices
II. To speed up the time it takes to send a file over the internet
III. The computation it takes to decompress data is cheaper than the storage space required to store uncompressed data

a)

I only

b)

I and II only

c)

I, II, and III

d)

III only

35.

Which of the following are true about Internet routing?

I. For any two points on the Internet, there exists only one path between the two points
II. Routing on the Internet is fault-tolerant and redundant

a)

I only

b)

II only

c)

Both I and II

d)

Neither I and II

36.

Which of the following statements are true about using visualizations to display a dataset?

I. Visualizations are visually appealing but don’t help the viewer understand relationships that exist in the data
II. Visualizations like graphs, charts, or visualizations with pictures are useful for conveying information, while tables just filled with text are not useful.
III. Patterns that exist in the data can be found more easily by using a visualization

a)

I and II

b)

II and III

c)

I, II, and III

d)

III only

37.

Alma will make the honor roll if she has at least a 3.80 GPA and misses less than 5 days of school in a year. In which of the following cases will Alma make honor roll?

a)

Alma has a 3.84 GPA and misses 5 days of school

b)

Alma has a 3.78 GPA and misses 2 days of school

c)

Alma has a 3.68 GPA and misses 6 days of school

d)

Alma has a 3.81 GPA and misses 3 days of school

38.

Karel the Dog is instructed to move forward one space. Then, if Karel is standing on a ball, Karel will turn right. Otherwise, Karel will move forward two spaces. Given the starting point below, where will Karel end up?

a)

b)

c)

d)

39.

Which of the following statements are true about the Internet?
I - The entire global population has Internet access
II - Widespread use of the Internet has led to concerns around privacy and copyright
III - Internet communication uses standard protocols that are used by all devices on the Internet
IV - The Internet connects devices and networks all over the world

a)

I and II

b)

I and IV

c)

II, III, and IV

d)

I, II, III, and IV

40.

Which binary value is equal to the decimal number 1210?

a)

122

b)

11002

c)

1111111111112

d)

1012

41.

Consider the following program code:

What is the result of running this program code if sum is initialized to 1 instead?

a)

10

b)

11

c)

4

d)

9

42.

Consider the following program code:

What are the values of x and y as a result of this program code?

a)

x has a value of y
y has a value of temp

b)

x has a value of 9
y has a value of 3

c)

x has a value of 3
y has a value of 9

d)

x and y have a value of 9

43.

What will the following code print to the screen?

println(15 + 3);

a)

18

b)

15 + 3

c)

Nothing

d)

153

44.

Which of the following lists the types of copyright license from least restrictive to most restrictive?

a)

Public Domain, All Rights Reserved, Some Rights Reserved

b)

All Rights Reserved, Some Rights Reserved, Public Domain

c)

Public Domain, Some Rights Reserved, All Rights Reserved

d)

All Rights Reserved, Public Domain, Some Rights Reserved

45.

Which of the following best explains what happens when a new device is connected to the Internet?

a)

An Internet Protocol (IP) address is assigned to the device.

b)

A device driver is assigned to the device.

c)

A packet number is assigned to the device.

d)

A website is assigned to the device.

46.

Which of the following is a benefit of the fault-tolerant nature of Internet routing?

a)

The ability to use a hierarchical naming system to avoid naming conflicts

b)

The ability to resolve errors in domain name system (DNS) lookups

c)

The ability to use multiple protocols such as hypertext transfer protocol (HTTP), Internet protocol (IP), and simple mail transfer protocol (SMTP) to transfer data

d)

The ability to provide data transmission even when some connections between routers have failed

47.

What is the latency of a system?

a)

The strength of the network connection

b)

The time it takes for a bit to travel from sender to receiver

c)

The distance that data needs to travel in a network

d)

The amount of data (in bits) that can be transmitted at any given time

48.

Which of the following best describes the difference between the domain and path of a URL?

a)

The domain specifies what kind of file is being requested. The path specifies the name of the file being requested.

b)

The domain specifies the name of the file being requested. The path specifies what kind of file is being requested.

c)

The domain specifies exactly what file is being requested. The path specifies where the browser’s request should be sent.

d)

The domain specifies where the browser’s request should be sent. The path specifies exactly what file is being requested.

49.

What does URL stand for?

a)

Usable Render List

b)

Uniform Resource Locator

c)

Uniform Response Layout

d)

Underlying Resource Locator

50.

Anything physical that lets a user interact with your idea is called a

a)

Mock-up

b)

Prototype

c)

Case study

d)

Storyboard