Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Algorithm Dvpmt:Pseudocode, Types of Statements

Total questions: 27

Worksheet time: 16mins

Name
Class
Date
1.

In the problem solving steps, what is the next step that comes after:

  1. 1. define the problem---->2. Propose and evalute solutions------> 3. select the most efficient solution-----> 4._________?

a)
Review the problem definition
b)

1st.-- Develop

2nd--- Represent the solution as an algorithm (Pseudocode or Flowchart)

c)
Analyze the results
d)
Gather more data
2.

Two ways an algorithm can be represented are?

a)

Flowcharts

b)
Mathematical equations and tables
c)

Codes and diagrams

d)

Pseudocode

3.

What is an algorithm?

a)
An algorithm is a step-by-step procedure for solving a problem.
b)

A set of instructions for solving a problem in an infinite number of times

c)
A random guess about a problem.
d)

A set of instructions for solving a problem in a finite number of times

4.

An (a)   is a set of instructions for solving a problem in a finite amount of times.

5.

Pseudocode is to statements as flowcharts is to diagrams that uses _______ and _______?

a)
symbols
b)
graphs
c)

flowlines

d)

symbols

6.

What is a pseudocode?

a)
A pseudocode is a graphical representation of data flow.
b)

A set of statements in the form of English-like code that mimicks a real programming language

c)
A pseudocode is a programming language used for software development.
d)
A pseudocode is a type of computer virus.
7.

What is a flowchart?

a)

A flowchart is a diagram that uses symbols and flowlines to outline the steps in solving an algorithm

b)
A flowchart is a mathematical equation used in calculus.
c)

A flowchart is a set of statements used to solve an algorithm

d)
A flowchart is a type of computer program.
8.

In algorith development, what is a statement?

a)
A statement is a comment that explains the code in an algorithm.
b)
A statement is a collection of multiple lines of code that defines a function.
c)
A statement is a type of variable used to store data in an algorithm.
d)

A statement is a single line of instruction

9.

In algorithm development, what are 4 types of ststements?

a)

Input

b)

Output

c)

Assignment

d)

Unconditional

e)

conditional

10.

In algorithm development, what are the function of input statements?

a)

allow the computer to receive data from users in variables for processing

b)
Input statements are only for internal data processing.
c)
Input statements are used to display results to users.
d)
Input statements are responsible for algorithm termination.
11.

Keywords to use in input statements are: (use capital letters)______ and ____

(a)  

12.

In algorithm development, what is the structure of Input Statements?

a)
Input statements are solely for defining algorithm logic.
b)

Keyword VariableName

c)
Input statements do not require any validation.
d)
Input statements are only used for output display.
13.

What are 2 examples of input statements?

a)

Read Name

b)

Accept num1

c)

A=B

d)

PRINT "Thomas"

14.

State a suitable input statement(s) for:

"Accept two numbers from the user"

a)

Accept num1, num2

b)
num1 = input('First number: '); num2 = input('Second number: ');
c)
num1 = input('Enter a value: '); num2 = input('Input another value: ');
d)
num1 = input('Please provide a number: ')
15.

What is the purpose of assignment statements?

a)
To define data types for variables.
b)
To create loops in code.
c)

Allow the computer to assign a value to a variable in memory

d)
To declare functions in programming.
16.

In assignment statements, the variable being assigned must be to the _______ of the equal sign.

a)
left side
b)
below the equal sign
c)
above the equal sign
d)
right side
17.

What is the purpose of output statements?

a)
To store data in a variable.
b)
To create new functions in the program.
c)

to prevent a buildup of information

d)

allow the computer to display information to the user on the screen

18.

Three keywords to use for output statements are:

a)

PRINT

b)

WRITE

c)

DISPLAY

d)

ACCEPT

19.

Output statements are used to display 3 things to the user: ______, ______ and______

a)

Message/Instruction

b)

Value of a variable

c)

Pictures/diagrams

d)

Label for a variable

20.

The prompt statement is an________ statement,

a)

Input

b)

Output

c)

Assignment

d)

guess

21.

What is a prompt statement?

a)
A prompt statement is a summary of a text.
b)
A prompt statement is a conclusion drawn from data.
c)
A prompt statement is a type of software error.
d)

A prompt statement is an output statement used to give instruction to the user.

22.

Keyword for a prompt statement?

a)

Print

b)

Accept

c)

Instruction/string

d)

Read

23.

PRINT"Please enter a number":

is an example of which type of starement"

a)

promt statement

b)
input statement
c)

assignment statement

d)
output statement
24.

The _____ statement may be used to display data that is in the computer's _________.

a)
show, processor
b)

output, memory

c)
display, hard drive
d)
output, cache
25.

The output statement may be used to display data that is in a computer's memory. The data stored in memory is stored using a _______ ________?

a)

variable name

b)
text format
c)
hexadecimal format
d)
decimal format
26.

How should you structure an output statement?

a)

Keyword variableName

b)

variableName Keyword

c)

none of these

27.

It is sometimes necessary to output a label for a variable in order to indentify the value of the variable being printed. What structure should you use for labels/tags?

a)

Keyword"label/string", variableName

b)

Keyword variableName

c)

Keyword"instruction/string"