wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Programming & Logic Cumulative Review

Total questions: 35

Worksheet time: 18mins

Name
Class
Date
1.

Which control structure repeats a set of instructions until some condition is met?

a)

Object

b)

Loop

c)

Sequence

d)

Selectiion

2.

Using short informal phrases to describe program functions (such as "if total is more than 10, add discount") is called:

a)

formatting.

b)

flow charts.

c)

pseudocode.

d)

logical thinking.

3.

What enables a programmer to determine the order in which instructions are executed, as well as the number of times (or even if) an instruction is executed?

a)

program flow

b)

control structures

c)

program syntax

d)

logic structures

4.

Greg is interested in computer programming languages, but he has very little experience in using them. Which type of programming language should he explore because it is easier to learn, use, read and modify?

a)

Machine

b)

Application

c)

High-level

d)

Assembly

5.

Which term describes a set of instructions that lists steps that must be followed in a particular order, starting at the beginning and continuing to the end?

a)

Assembly

b)

Sequential

c)

Selection

d)

Iteration

6.

Consider the general problem-solving steps shown. Which option lists the problem-solving steps in the correct order?

a)

4, 2, 1, 3

b)

1, 2, 3, 4

c)

4, 1, 3, 2

d)

2, 1, 4, 3

7.

Julie has an idea. She wants to use a computer to create a list of daily "to-do" suggestions based on the previous activity on her calendar. To create this, she needs to develop a set of instructions to tell the computer what to-do to accomplish this task. This is known as:

a)

a flowchart.

b)

an algorithm.

c)

a computer program.

d)

a programming language.

8.

Which variable data type is used to store a whole number that does not contain a decimal?

a)

Boolean

b)

Integer

c)

String

d)

Floating point

9.

Basic mathematics taught in elementary school is a base 10 number system (which makes it easy if you are using your fingers). Computers use a different number system, known as:

a)

base 6.

b)

base 8.

c)

base 1.

d)

base 2.

10.

What is the only language a computer can understand?

a)

High-level

b)

Assembly

c)

Machine

d)

Application

11.

Which term describes a series of zeroes and ones that represent the basic unit of data that a computer processes?

a)

code

b)

switch

c)

data

d)

byte

12.

During testing, your development team identified some problems in the first program draft. What is the next step you need to complete?

a)

test the plan

b)

review the result of the solution

c)

revise the plan until a solution is found

d)

use logic to plan a solution

13.

Which type of programming is designed by breaking problems into smaller, logical problems to make them easier to execute?

a)

functional

b)

structured

c)

scripting

d)

object-oriented

14.

Devising a plan to solve a problem or perform a task using a set of step-by-step instructions is called:

a)

running a program.

b)

interpreting instructions.

c)

creating syntax.

d)

writing an algorithm.

15.

Which type of programming error causes a program to stop loading or executing?

a)

runtime

b)

logic

c)

syntax

d)

system

16.

Which of the following is used to store data in the computer's memory that the computer can access and use when running a program?

a)

variable

b)

file

c)

data

d)

operator

17.

Computers organize the zeroes and ones that represent an instruction into a series of eight pieces. This series of eight ones or zeroes is known as:

a)

data.

b)

a bit.

c)

code.

d)

a byte.

18.

Variables can hold different types of data, and they are classified based on the type of data they hold. The numbers 7.5, 2.1 and 48.6 would be stored using which variable data type?

a)

integer

b)

string

c)

floating point

d)

Boolean

19.

Consider the following:


  1. Input a number
  2. Check to see if the number ends in 0, 2, 4, 6 or 8?
  3. If yes, write "The number is even."
  4. If no, write "The number is odd."


This is an example of which type of control structure?

a)

sequence

b)

iteration

c)

loop

d)

selection

20.

Which statement is true about objects?

a)

Objects created using the same class may contain different properties; however, the properties must contain the same values.

b)

Objects created using the same class must contain the same properties; however, the properties may contain different values.

c)

Objects created using the same class can contain different properties and property values.

d)

Objects created using the same class must contain the same the same properties and property values.

21.

Which control structure includes the do/while statement?

a)

object

b)

selection

c)

sequential

d)

loop

22.

Alex and his team are given a mission to create a program that finds the average age (in the total days, not years) of the students at their school. What should be their first step for creating an algorithm to solve the problem?

a)

test and refine the solution

b)

determine the logic needed to plan a solution to the problem

c)

identify and understand the problem

d)

create the procedures needed to execute the solution

23.

Eric is using object-oriented programming to design a game. He has created a Dragon class, and he has used the Dragon class to build two Dragon objects. Which term describes the objects that Eric built using the Dragon class?

a)

instances

b)

subclasses

c)

occurrences

d)

methods

24.

Cara has added the variable names needed by her program. She must now assign an initial value to each variable. What is the term for assigning this initial value?

a)

initializing

b)

encoding

c)

declaring

d)

executing

25.

Consider the loop control structure in programming. Which term describes a loop that continues repeating without a terminating (ending) condition?

a)

unlimited loop

b)

infinite loop

c)

sequence loop

d)

conditional loop

26.

Which operator is an example of a Boolean operator?

a)

++

b)

II

c)

!=

d)

%

27.

Which type of error occurs when a programmer misspells a word or instruction?

a)

syntax

b)

system

c)

runtime

d)

logic

28.

Which type of statement is an example of a selection programming structure?

a)

do while

b)

for

c)

if/else

d)

while

29.

What is the process that a programmer uses to identify errors and make corrections to a program that does nor perform the way it was intended or produces incorrect results?

a)

debugging

b)

compiling

c)

testing

d)

executing

30.

You are designing a computer program that calculates the amount of change a customer should receive. You create a program design document using the following pseudocode to demonstrate the program flow:


item1 = input cost of item 1

item2 = input cost of item 2

item3 = input cost of item 3

total = item1 + item2 + item3

amtPaid = input amount paid

change = ________________


Notice the blank at the end of the program. Which expression correctly completes the blank?

a)

total - amtPaid

b)

amtPaid - total

c)

amtPaid * item1 + item2 + item3

d)

item1 + item2 + item3 - amtPaid

31.

Veronica has written a computer program that locates records in a database. During testing, the program suddenly stops running. What is most likely causing the program to stop running?

a)

a debugging error

b)

a runtime error

c)

a syntax error

d)

a logic error

32.

John has tried to run his program, but an error has occurred. He looks closely at the code and realizes there are several misspelled instructions. What type of error did John's spelling mistakes create?

a)

syntax

b)

system

c)

runtim

d)

logic

33.

Raphael is asked in his programming class to describe a benefit of structured programming. Which of the following would the best response for Raphael to give?

a)

It has the same structure and set of commands as machine language but uses symbols and recognizable codes.

b)

It divides the problem into smaller, more manageable tasks that are performed in a sequence to solve the larger problem.

c)

It focuses on classes and objects that can be reused and changed.

d)

It is a set of rules for defining how declaration, functions, commands and other statements should be arranged in a computer program.

34.

Carrie is using object-oriented programming to code her latest video game. In the game, she has objects that are little monsters. Each is unique in their own way (size, color, etc.). To create each of these unique looking objects, she needs to change the:

a)

properties.

b)

classes.

c)

methods.

d)

arguments.

35.

What are the three main programming structures?

a)

machine, assembly, high-level

b)

Java, Pythn, Visual Basic

c)

sequence, selection, loop

d)

structured, object-oriented, procedural