wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Programming and Logic Lesson 2

Total questions: 16

Worksheet time: 16mins

Name
Class
Date
1.

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

2.

An algorithm is the process of:

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.

3.

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

a)

Runtime

b)

Syntax

c)

System

d)

Logic

4.

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

a)

Flowchart

b)

Debugging

c)

Pseudocode

d)

Assembly

5.

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 2 and revise until the most efficient method is found

b)

Create procedures needed to execute the solution.

c)

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

d)

Create a series of statements using code.

6.

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

a)

Assembly

b)

Flowchart

c)

Debugging

d)

Pseudocode

7.

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.

8.

There are _____ types of programming errors.

a)

2

b)

5

c)

4

d)

3

9.

Which of the following is not a goal of testing?

a)

To determine if the program works efficiently.

b)

To ensure that it solves the original problem.

c)

To determine if there are errors in the program.

d)

To determine if performs as intended.

10.

What is not included in a testing plan?

a)

Debugging

b)

Desk checking

c)

Testing individual components

d)

Creating new algorithms

11.

What type of error occurs while the program is running?

a)

Syntax

b)

Logic

c)

Runtime

d)

System

12.

What is the pencil and paper method of finding errors?

a)

Debugging

b)

Desk Checking

c)

Slicing

d)

Testing Individual Components

13.

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

a)

Debugging

b)

Flowchart

c)

Assembly

d)

Pseudocode

14.

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.

15.

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.

16.

Problem solving is _______________________.

a)

translating a program's instructions into machine language.

b)

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

c)

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

d)

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