wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Programming & Logic Unit Review

Total questions: 85

Worksheet time: 43mins

Name
Class
Date
1.

Which of the following is a program that translates other programming languages into machine language?

a)

a. Binary

b)

b. Transistor

c)

c. Assembler

d)

d. Compiler

2.

Which program translates a series of instructions, executes them, and then translates the next series until the program is fully executed?

a)

a. Transistor

b)

b. Interpreter

c)

c. Assembler

d)

d. Compiler

3.

Which of the following is a number system that uses the values 0 and 1, and is the primary language that computers use to communicate?

a)

a. Binary

b)

b. Assembly

c)

c. Decimal

d)

d. Pseudocode

4.

Java, Visual Basic, Python and C++ are examples of what type of programming language?

a)

Machine

b)

Assembly

c)

High-level

5.

Which type of error causes a program to produce incorrect results, such as the sum of two values instead of the difference of two values?

a)

Syntax

b)

Logic

c)

Runtime

d)

System

6.

Which type of error is usually identified by the compiler or interpreter?

a)

Syntax

b)

Logic

c)

Runtime

d)

System

7.

Which tool used to plan computer programs is an English-like representation of program steps?

a)

Debugging

b)

Flowchart

c)

Assembly

d)

Pseudocode

8.

The general problem-solving strategy includes the following activities: understand the problem, devise a plan, test the plan, review the result, and revise. What is the next step in the process?

a)

Return to Step 1 and repeat the process until the solution is found.

b)

Create procedures needed to execute the solution.

c)

Create a series of statements using code.

9.

Which tool used to plan computer programs is a pictorial representation of program steps?

a)

Debugging

b)

Flowchart

c)

Assembly

d)

Pseudocode

10.

Logical thinking is:

a)

the process of solving a problem.

b)

progressively moving from one connected thought to another.

c)

systematic steps to correct an error.

d)

the steps required to create a solution.

11.

There are (a)   types of programming errors.

12.

What is not included in a testing plan?

a)

Debugging

b)

Desk checking

c)

Testing individual components

d)

Creating new algorithms

13.

What type of error occurs while the program is running?

a)

Syntax

b)

Logic

c)

Runtime

d)

System

14.

What is the pencil and paper method of finding errors?

a)

Debugging

b)

Desk checking

c)

Slicing

d)

Testing individual components

15.

Problem solving is:

a)

devising a set of step-by-step instructions to solve a problem or perform a task.

b)

using a pencil and paper to work through an existing program by hand.

c)

determining whether an existing program performs its intended task and works efficiently.

d)

translating a program’s instructions into machine language.

16.

What is the name of the process that identifies errors and makes necessary corrections to meet the program’s intended outcome?

a)

Debugging

b)

Flowchart

c)

Assembly

d)

Pseudocode

17.

Which of the following statements are correct when trying to solve a complex problem?

a)

Confusion and frustration are often part of the process.

b)

A deep understanding of the problem is not necessary.

c)

Testing is rarely required.

d)

Finding solutions to problems are quick and simple.

18.

Which of the following statements are not correct about desk-checking?

a)

It is a computerized process.

b)

It is a simple method using a pencil and paper.

c)

It is a manual process.

d)

It is very effective.

19.

Which programming structure continues to repeat actions while a condition remains true?

a)

Loop

b)

Sequence

c)

Selection

d)

Object

20.

Which programming structure performs a set of instructions in the order they appear?

a)

Loop

b)

Sequence

c)

Selection

d)

Object

21.

When a computer carries out a program's instructions, it is called (a)   the program.

22.

Which programming structure makes a decision in order to determine which set of instructions to carry out?

a)

Loop

b)

Sequence

c)

Selection

d)

Object

23.

The if/else instruction set is considered a(n) ___ structure.

a)

loop

b)

sequence

c)

selection

d)

object

24.

The whole instruction set is considered a(n) ________ structure.

a)

loop

b)

sequence

c)

selection

d)

object

25.

What is a control structure?

a)

Determine the order in which instructions are executed, as well as the number of times or even whether an instruction is executed

b)

Pseudocode

c)

Determines whether an existing program performs its intended task and works efficiently

d)

Create procedures needed to execute the solution.

26.

There are ____ main control structures.

a)

2

b)

5

c)

6

d)

3

27.

Which of the following is not a common loop statement?

a)

Do-while

b)

While

c)

Stop

d)

For

28.

There are ____ basic types of loops.

a)

6

b)

3

c)

5

d)

2

29.

Which of the following are types of loops?

a)

Count controlled

b)

Text controlled

c)

Program controlled

d)

Bug controlled

30.

The main logic control structures include:

a)

Text, numbers and data

b)

Control, do-while, selection

c)

Selection, control and loop

d)

Loop, control, and object

31.

Which structure allows the computer to execute an instruction only if a certain condition exists?

a)

Logic

b)

Selection

c)

Control

d)

Loop

32.

An do-while statement tests a condition and is an example of a:

a)

Logic

b)

Selection

c)

Control

d)

Loop

33.

This control structure will execute each instruction one after another until it reaches the end of the program.

a)

Logic

b)

Selection

c)

Control

d)

Loop

34.

What control structure is also called iteration?

a)

Logic

b)

Selection

c)

Control

d)

Loop

35.

Named memory locations whose contents can vary are called:

a)

expressions.

b)

variables.

c)

programs.

d)

algorithms.

36.

Which of the following is a valid variable name in programming?

a)

First Name

b)

1Name

c)

Phone#

d)

phoneNumber

37.

Consider the following expression: Set grandTotal = Total + 2. If the Total variable has the value 5, what is the value of grandTotal after the expression is evaluated?

a)

Total2

b)

3

c)

7

d)

5

38.

Which programming term means joining two strings together?

a)

Initializing

b)

Declaring

c)

Evaluating

d)

Concatenation

39.

Which of the following is used by the computer to determine how the data stored in a variable can be manipulated?

a)

Data type

b)

Name

c)

Operator

d)

Assignment

40.

Which type of operator only returns the values true and false?

a)

Assignment

b)

Arithmetic

c)

Comparison

d)

Procedural

41.

Which data type contains only two values and is used to compare conditions?

a)

Integer

b)

Boolean

c)

String

d)

Floating point

42.

What is the function of the <= operator?

a)

Greater than or equal to

b)

Less than or equal to

c)

Not equal to

d)

And equal to

43.

Which choice lists examples of logical (Boolean) operators?

a)

&&

b)

||

c)

++

d)

!

e)

!=

44.

You must include this step along with initializing before you can use a variable.

a)

Evaluate

b)

Declare

c)

Compare

d)

Assign

45.

According to the variable naming rules, names must begin with:

a)

Number

b)

Symbol

c)

Space

d)

Letter or underscore

46.

Telling a program that a specific named variable exists is called:

a)

declaring

b)

evaluating

c)

initializing

d)

naming

47.

Which of the following is not a data type?

a)

Character

b)

String

c)

Integer

d)

Object

48.

Which of the following is considered a character data type?

a)

5

b)

6.7

c)

John

d)

?

49.

A whole number that does not contain a decimal is an (a)   .

50.

What is the term for a combination of variables, values, functions and operators?

a)

Expressions

b)

Variables

c)

Programs

d)

Algorithms

51.

Expressions are evaluated using ___.

a)

variable rules

b)

order of operations

c)

rules of initializing

d)

declaration

52.

Besides the arithmetic operator, there are ___ other types of operators.

a)

5

b)

4

c)

3

d)

2

53.

Arithmetic operators include addition, subtraction, multiplication, and division. Which of the following is not an arithmetic operator?

a)

Increments by 1

b)

Decrements by 1

c)

Comparison

d)

Modulus

54.

Named units of code that perform a task or cause an action to take place are called:

a)

events

b)

functions

c)

classes

d)

objects

55.

Consider the following pseudocode: Get the Sqrt of 9. This pseudocode is an example of what?

a)

An object that contains a parameter

b)

A class that contains an argument

c)

An event that contains a parameter

56.

Which of the following is a function used to tell the program what to do when a certain action takes place?

a)

Event

b)

Argument

c)

Event handler

d)

Parameter

57.

Which programming component is used when the mouse is clicked to trigger the execution of a specific action?

a)

Event

b)

Argument

c)

Event handler

d)

Parameter

58.

What are the benefits of using functions?

a)

Functions make the program more efficient.

b)

Functions make the program run without errors.

c)

Functions create new lines of code.

d)

Functions finds errors in the program.

59.

Which of the following is not a common function in Scratch?

a)

Random

b)

Round

c)

Scientific

d)

Formula

60.

Function blocks with rounded ends returns:

a)

string or numeric information.

b)

boolean information.

c)

current values.

d)

past values.

61.

Function blocks with angled or pointed ends returns:

a)

string or numeric information.

b)

boolean information.

c)

current values.

d)

past values.

62.

Function blocks with check boxes return:

a)

string or numeric information.

b)

boolean information.

c)

current values.

d)

past values.

63.

In Scratch, event blocks have which of the following characteristics?

a)

a. rounded tops and bumps on the bottom

b)

b. a bump on the top and rounded bottoms

c)

c. a bump on the top and bottom

d)

d. rounded tops and bottoms

64.

In Scratch, event blocks run the block __ when the triggering event occurs.

a)

a. above

b)

b. below

c)

c. to the right

d)

d. to the left

65.

What is the difference between an event and an event handler in programming?

a)

a. The event handler triggers the event

b)

b. The event triggers the event handler

c)

c. Events and triggers are the same

d)

d. Triggers do nothing

66.

What is an argument in programming?

a)

a. an object that contains a parameter

b)

b. event that contains a parameter

c)

c. a value that is passed to a routine

d)

d. a function that contains an argument

67.

Which choice lists the two main programming approaches?

a)

a. Procedural and object-oriented

b)

b. Structural and procedural

c)

c. Sequential and structural

d)

d. Object-oriented and sequential

68.

Which of the following terms describes a group of objects with common properties?

a)

a. Function

b)

b. Event

c)

c. Class

d)

d. Parameter

69.

When a class is used to build an object, the object is called a(n) (a)   of the class.

70.

What is the term for the various characteristics of an object?

a)

Properties

b)

Instances

c)

Arguments

d)

Methods

71.

The actions that an object can perform are called __________.

a)

arguments

b)

parameters

c)

methods

d)

classes

72.

A(n) __________ is the variable that holds the value needed by the method.

a)

argument

b)

parameter

c)

object

d)

instance

73.

What is the term for the value that is passed to a method when it is called so it knows what to do?

a)

Argument

b)

Parameter

c)

Object

d)

Instance

74.

The programming method that uses steps in an orderly manner:

a)

procedural

b)

object oriented

c)

methodical

d)

sequential

75.

The programming method that utilizes reused items:

a)

procedural

b)

object oriented

c)

methodical

d)

sequential

76.

Objects are created based on:

a)

function

b)

event

c)

class

d)

parameter

77.

An alternate term for class is:

a)

blueprint

b)

instance

c)

argument

d)

method

78.

Which of the following is not considered a characteristic of an object?

a)

Size

b)

Color

c)

Type

d)

Method

79.

In Scratch, arguments are represented as:

a)

Ovals or hexagons

b)

Squares

c)

Rectangles

d)

Circles

80.

In Scratch the default Boolean argument is:

a)

True

b)

False

c)

1

d)

0

81.

In Scratch, Boolean blocks have angled input areas for the following reasons:

a)

To insert inside other blocks

b)

To run before other blocks

c)

To run after other blocks

d)

To perform a wait routine

82.

Python is an example of a programming language.

a)

True

b)

False

83.

Which is not a computer programming language?

a)

C++

b)

Spanish

c)

CoffeeScript

d)

Java

84.
What is finding and fixing errors in programs?
a)
Debugging
b)
Program
c)
Bug
d)
Code
85.
What do we call the person who writes the instructions for the computer to complete a task?
a)
architect
b)
programmer
c)
Bob
d)
composer