wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Tri 1 Review

Total questions: 63

Worksheet time: 47mins

Name
Class
Date
1.

Which of the following decimal (base-10) values is equivalent to the binary (base-2) value 101001?

a)

22

b)

37

c)

41

d)

82

2.

What value does the above code segment display?

a)

17

b)

36

c)

53

d)

No value is ever displayed because the algorithm repeats the REPEAT UNTIL block indefinitely.

3.

Which of the following is true about program documentation?

a)

Program documentation is only needed for programs in development; it is not needed after a program is completed.

b)

Program documentation is useful when programmers collaborate but not when a programmer works individually on a project.

c)

Program documentation is useful during initial program development and also when modifications are made to existing programs.

d)

Program documentation should not be changed after it is first written.

4.

Consider the following numbers. Binary 1100, Decimal 11, and Hexadecimal D. Which of the following lists the numbers in order from least to greatest?

a)

Binary 1100, Decimal 11, Hexadecimal D

b)

Decimal 11, Binary 1100, Hexadecimal D

c)

Decimal 11, Hexadecimal D, Binary 1100

d)

Hexadecimal D, Decimal 11, Binary 1100

5.
A program is expressed in a programming language. Which of the following is true of the program?
a)
The program can also be expressed as binary code, but will be more easily understood by humans when expressed in a higher-level programming language.
b)
The program can also be expressed as binary code, which will reduce the likelihood of errors.
c)
The program cannot be expressed as binary code, because binary code can only be used to represent data.
d)
Some parts of the program can be expressed as binary code, but operations must be expressed using a higher-level programming language.
6.
Select the answer that lists the units of bytes in ascending order (from smallest to largest)
a)
Gigabyte, megabyte, terabyte
b)
Megabyte, terabyte, kilobyte
c)
Gigabyte, terabyte, megabyte
d)
Kilobyte, gigabyte, terabyte
7.
 How many different digits are used in the Hexadecimal number system?
a)
2
b)
10
c)
8
d)
16
8.

What does len() do?

a)

It stops the list from continuing

b)

It adds up everything in the list

c)

It counts the amount of values in the list

d)

None of the above

9.

What is % in Python?

a)

Square Root

b)

Modulus

c)

Add

d)

Square Root

10.
Convert 00010001 to decimal
a)
17
b)
27
c)
37
d)
47
11.
Convert 11001100 to decimal
a)
224
b)
134
c)
104
d)
204
12.
What are the only two numbers you can use in binary?
a)
0 and 1
b)
1 and 2
c)
1, 2, 3, 4, 5, 6, 7, 8, 9, 10
d)
1, 2, 4, 8, 16
13.
Which of these is the correct sequence for the place values for binary numbers?
a)
1, 2, 4, 8, 16, 32, 64, 128
b)
1, 2, 4, 6, 8, 10, 12, 14, 16
c)
1, 2, 3, 4, 5, 6, 7, 8
d)
0, 1
14.
What is the point of binary?
a)
It represents how computers interpret electrical signals
b)
Because we like to make you do extra maths ;-D
c)
For the lulz
d)
Because it describes star systems
15.
A bit is 
a)
a numerical label assigned to each device.
b)
the smallest unit of data in a computer.
c)
a keyboarding term for typing.
d)
is a numeral system made up of 16 symbols.
16.
How is our number system different from the binary system?
a)
Our number system is base-5; the binary system is base-3
b)
Our number system is base-10; the binary system is base-2
c)
Our number system is base-10; the binary system is base-1
d)
Our number system is base 100; the binary system is base-2
17.

This loop can only be used when the programmer knows the number of times a code is to be repeated

a)

while

b)

for

c)

do while

d)

repeat until

18.
What does this block of code do?
for( int i = 0; i < 10; i++)
  out.println("hello");
a)
Prints the String "hello" ten times.
b)
Prints the String "hello"
c)
Heebee Jeebies
d)
Nothing. The code does not run.
19.
What is an index variable in programming?
a)
A variable that changes every time a loop runs until the loop condition is false.
b)
A variable that keeps track of a textbook page number.
c)
An iterator
d)
Tomfoolery
20.
How many choices are possible when using a single if-else statement?
a)
1
b)
2
c)
3
d)
4
21.
 Evaluate (to true or false) each of the following expressions:
14 >= 14
15 > 15
16 != 16
18 >= 19
a)
T, F, F, F
b)
T, T, T, T
c)
F, T, F, F
d)
F, T, T, F
22.
Which expression below would determine if a number was odd?
a)
number % 2 ==0
b)
number / 2 == 0
c)
number % 2 == 1
d)
number % 10 == number
23.
a)
Low bridge: 
b)
Low bridge: proceed with caution.
c)
Proceed with caution.
d)
<nothing prints to the screen>
24.

Which method puts all items in x in ascending order?

a)

sort(x)

b)

binarySearch(x,y)

c)

equals(x,y)

d)

toString(x)

e)

fill(x,y)

25.
Which sorting algorithm makes one swap per pass (possibly swapping an element with itself)?
a)
Selection Sort
b)
Bubble Sort
c)
Insertion Sort
26.
Which sorting algorithm may make multiple swaps per pass?
a)
Bubble Sort
b)
Selection Sort
c)
Insertion Sort
27.
Which sorting algorithm shifts elements instead of swapping elements if needed in each pass.
a)
Bubble Sort
b)
Selection Sort
c)
Insertion Sort
28.
The following lists represent 3 passes of a sorting algorithm. Which algorithm is being used to sort the list?
 
4    5    9    6    2    7

4    5    6    2    7    9 
4    5    2    6    7    9
a)
Bubble Sort
b)
Selection Sort
c)
Insertion Sort
29.
We are sorting the following list in ascending order:
 
1    4    2    9    3    8    5
 
What does the list look like after one pass of the bubble sort algorithm. 
a)
1 2 4 3 8 5 9
b)
1 4 2 5 3 8 9
c)
4 2 9 3 8 5 1
30.

Which algorithm matches this description: "a sorting algorithm that treats the input as two parts, a sorted part and an unsorted part, and repeatedly inserts the next value from the unsorted part into the correct location in the sorted part."

a)

Selection Sort

b)

Insertion Sort

c)

Merge Sort

d)

Radix Sort

31.

Which algorithm matches this description: "a sorting algorithm that treats the input as two parts, a sorted part and an unsorted part, and repeatedly selects the proper next value to move from the unsorted part to the end of the sorted part."

a)

Selection Sort

b)

Insertion Sort

c)

Radix Sort

d)

Merge Sort

32.

A new or improved idea, device, product, etc, or the development thereof.

a)

Innovation

b)

Technology

c)

Improvement

d)

Protocol

33.

A way of representing information using only two options.

a)

BInary

b)

Doubled

c)

Algorithm

d)

Hexadecimal

34.

American Standard Code for Information Interchange; the universally recognized raw text

a)

ASCII

b)

USACII

c)

QWERTY

d)

IETF

35.

Instructions for a computer.

a)

Code

b)

Comand

c)

Protocol

d)

Direction

36.
A set of step by step instructions
a)
algorithm
b)
abstraction
c)
iteration
d)
invitation
37.
One time through a series of steps that get repeated is called _________.
a)
iteration
b)
sequencing
c)
processing
d)
execution
38.
Which of the following is an example of abstraction?
a)
Writing a function for code you repeat often
b)
Using logic symbols like < and >
39.
Why do we use functions?
a)
Make the program easier to read
b)
Avoid retyping the same lines of code
c)
Both
d)
Neither
40.
"George" is a(n)...
a)
String
b)
Integer
c)
Float
d)
Boolean
41.
A loop repeated if the condition is true / false
a)
While loop
b)
For loop
c)
Repeat loop
d)
If...else
42.
Which statement will check to see if a is equal to b?
a)
if a == b
b)
if a = b:
c)
if a != b:
d)
if a == b:
43.
Numbers with a decimal point belong to a type called...
a)
boolean
b)
integer
c)
fancy
d)
float
44.
What is pseudocode?
a)
simplified programming language
b)
specific syntax in a programmming language
c)
code that can be used on a computer
d)
a debugging toolcode
45.
Which statement best describes this block?
a)
uses a test condition
b)
infinite loop
c)
a set number of iterations
d)
stops scripts
46.
Indentation in Python is
a)
Extremely important
b)
Not important at all
47.
An app is made to calculate total miles traveled. The developers adjusted the algorithm so that the app is accurate to the nearest 10th of a mile. Which word best defines this action?
a)
iteration
b)
heuristic 
c)
selection
d)
abstraction
48.
Which word defines an 'on/off ' scenario, often compared as "true" or "false" ?
a)
boolean
b)
integer
c)
iteration
d)
sectional
49.
Which word best defines values that do not change? 
a)
Variable
b)
Constant
c)
Integer
d)
Boolean
50.
These two commands are associated with what computer science principle?
a)
Branching
b)
Iteration
c)
Methods
d)
Objects
51.
A sprite in MIT Scratch represents what type of computer science principle?
a)
Branching
b)
Iteration
c)
Methods
d)
Objects
52.
Another term for iteration is...
a)
Decision Points
b)
Loops
c)
Pulling commands from other libraries
d)
Start-up meetings to get everyone dedicated to solving the most important aspects of the software they are developing
53.
Why won't this code continuously move the sprite when clicking the directional arrows?
a)
The "if" statements need to be inside a "forever" block
b)
The "point in directions" values need to change
c)
The "move 1 steps" commands need to be inside a "forever" block
d)
Need a 2nd "point in direction" block after "move 1 step"
54.

What is a conditional?

a)

Makes the Scratch cat touch something

b)

Instructions telling the program what to do

c)

When the Scratch cat touches something

d)

Tests whether something is true or false

55.
What is interactivity?
a)
When you can touch something
b)
Instructions telling the program what to do
c)
Has an input and an output
d)
Tests whether something is true
56.
The green blocks that allow comparisons such as >, <, =, >=, <= are called..?
a)
logics
b)
operators
c)
formulas
d)
expressions
57.

This is the action of adding an element to the end of a list or array.

a)

append

b)

addendum

c)

sum

d)

product

58.

Writing code in this type of language often involves dragging and dropping pictorial code, rather than typing text.

a)

block-based language

b)

boolean logic

c)

text-based language

d)

Java

59.

Abstraction

a)

American Standard Code for Information Interchange; the universally recognized raw text format that any computer can understand

b)

A simplified representation of something more complex. Abstractions allow you to hide details to help you manage complexity, focus on relevant concepts, and reason about problems at a higher level.

c)

A group of computers and servers that are connected to each other.

d)

A type of computer that forwards data across a network

60.

When the code is ran, an error occurs due to line 4. What type of error exists in line 4?

a)

Syntax Error

b)

Type Error

c)

Indentation Error

d)

Concatenation Error

61.

There's syntax error in lines 2 and 4. What is the proper correction?

a)

use the == comparing operater

b)

use parenthesis around the condition

c)

use .lower() function for line 1

d)

using str() function for the conditions

62.

There's a syntax error for this program code. What line is it one?

a)

Line 14

b)

Line 1

c)

Line 17

d)

Line 2

63.

The code utilizes the randint() fuction. What line of code should be at the top to be able to use the randint() in line 2?

a)

from random import randint

b)

import randint from random

c)

import randint

d)

import random