wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

ALGORITHIMC INTELLIGENCE

Total questions: 124

Worksheet time: 1hrs 14mins

Name
Class
Date
1.

Which kind of loop would be used?


I need a revision program that will run through revision questions 4 times.

a)

FOR Loop

b)

WHILE Loop

2.

Which type of loop iterates until instructed otherwise?

a)

FOR loop

b)

WHILE loop

3.

FOR loops are

a)

loops which run an unknown number of times

b)

loops which run for a specific number of times

c)

the same as if statements

d)

not part of programming

4.

In programming, what is iteration/looping?

a)

The repetition of steps within a program

b)

The order in which instructions are carried out

c)

A decision point in a program

5.

_________is a collection of instructions that can be executed by a computer to perform a specific task.

a)

Program

b)

Algorithms

c)

Flowchart

6.

i = 1

while False:

if i%2 == 0:

break

print(i)

i += 2

a)

1

b)

1357......

c)

1234......

d)

none of the mentioned

7.

i = 1

while True:

if i%7 == 0:

break

print(i)

i += 1

a)

123456

b)

1234567

c)

error

d)

none

8.

How many times the following loop will execute:

i = 1

while True:

print(i)

i += 2

a)

0

b)

2,4,6,8,..................

c)

1,3,5,7,9,.............

d)

1,2,4,6,8......................

9.

The program above:

a)

prints all the odd numbers between 1 and 20

b)

prints all even numbers between 1 and 20

c)

print all the odd numbers between 1 and 21

d)

prints all the even numbers between 1 and 21

10.

for loop in python works on:

a)

1.range

b)

2.iteration

c)

3.Both of the above

d)

4.None of the above

11.

What is a set of instructions that a computer uses to solve a problem?

a)

Algorithm

b)

Processing

c)

Storage

d)

Output

12.

This type of algorithm involves asking a question and a choice is made.

a)

Sequence

b)

Selection

c)

Iteration/Looping

13.

This type of algorithm involves repeating instructions.

a)

Sequence

b)

Selection

c)

Iteration/Looping

14.

This type of algorithm involves instructions done one after another.

a)

Sequence

b)

Selection

c)

Iteration/Looping

15.
a)

Rejecting

b)

Reclining

c)

Repeating

16.

What type of iteration is in this story?

a)

Sequence

b)

Selection

c)

Iteration/Looping

17.

What type of algorithm is in this story?

a)

Sequence

b)

Selection

c)

Iteration/looping

18.

What type of algorithm is shown in this story?

a)

Sequence

b)

Selection

c)

Iteration/looping

19.

Instructions carried out one after another in order is called

a)

Sequence

b)

Selection

c)

Iteration/Looping

20.

Following a recipe would be an example of

a)

Sequence

b)

Selection

c)

Iteration/looping

21.

Hammering a nail into the wall would be an example of

a)

Sequence

b)

Selection

c)

Iteration/Looping

22.

Deciding to wear a jacket or not to school would be an example of

a)

Sequence

b)

Selection

c)

Iteration/looping

23.

Indicates the beginning or end of a program flow in your diagram.

a)

algorithm

b)

subroutine

c)

terminator

d)

preparation

24.

Keep repeating a part of a flowchart with this construct

a)

loop

b)

algorithm

c)

document

d)

diamond

25.

Make a decision in your flowchart with this symbol

a)

document

b)

rectangle

c)

diamond

d)

display

26.

Defines the relationship of one element to another in a flowchart.

a)

subroutine

b)

algorithm

c)

terminator

d)

arrow

27.

Coding uses "For in what type of algorithm

a)

Sequence

b)

Selection

c)

Iteration

28.

What is an algorithm?

a)

Patterns and trends used to solve a problem

b)

A set of step-by-step instructions to resolve a problem

c)

A programming language

29.

What are algorithms used for?

a)

To plan out the solution to a problem

b)

As a platform to program a solution

c)

To test a solution to a problem

30.

Which of these is NOT an algorithm?

a)

Following recipe instructions

b)

Working out how an engine works

c)

Tying your shoelaces

d)

Making a cup of coffee

31.

What does an algorithm need to be (choose more than 1)

a)

Clear instructions

b)

Exact

c)

Easy to understand

d)

Complex

32.

When can an algorithm be used?

a)

Only with computers

b)

For programming

c)

To design a solution to any problem

33.

What is decomposition?

a)

Searches the computer's memory for data

b)

Repeats a program

c)

Getting small part of a problem and adding them together

d)

Breaking down a complex problem

34.

What is abstraction?

a)

Removal of certain details, keeping relevant the information

b)

Stores data in a program for retrieval

c)

Freedom from representing art

d)

Detects errors while program is running

35.

If it is AFTER 7am, what do you need to do?

a)

Take the bus

b)

Take the subway

c)

Check the time

d)

Leave home

36.

What should be considered when designing an algorithm?

a)

If there is more than one way to solve the problem

b)

If the correct hardware is being used

c)

If the correct software is being used

37.

You are at the yellow arrow, pointing in the direction indicated. How would you move to fill in the 2 black squares?

a)

Straight, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 1, Fill Square

b)

Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 1, Fill Square

c)

Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn right, Straight x 1, Fill Square

d)

Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 2, Fill Square

38.

What is an algorithm?

a)

Patterns and trends used to solve a problem

b)

A set of step-by-step instructions to resolve a problem

c)

A programming language

39.

What are algorithms used for?

a)

To plan out the solution to a problem

b)

As a platform to program a solution

c)

To test a solution to a problem

40.

How can an algorithm be represented?

a)

As a flowchart only

b)

As pseudocode only

c)

As a flowchart or pseudocode

41.

What is a flowchart?

a)

A diagram that represents a set of instructions

b)

A high-level language that has specific syntax

c)

A way of describing a set of instructions that doesn’t use specific syntax

42.

What is the correct symbol for a process instruction in a flowchart?

a)

A rectangle

b)

A parallelogram

c)

A square

43.

What is the correct symbol for an input in a flowchart?

a)

A parallelogram

b)

A rectangle

c)

A square

44.

What links each instruction in a flowchart?

a)

A line

b)

A double line

c)

An arrow

45.

What is the correct symbol for a decision in a flowchart?

a)

A rectangle

b)

A diamond

c)

A square

46.

What is the correct symbol for an output in a flowchart?

a)

A parallelogram

b)

A rectangle

c)

A diamond

47.

Algorithms are 1 of the 4 techniques of Computational Thinking

a)

True

b)

False

48.
What is an Algorithm?
a)
A chart showing the flow of a series of events
b)
Step-by-step instructions used to solve a problem
c)
A decision arrived at by following instructions
d)
A computer program that follows a chart
49.
When can algorithms be used?
a)
Only with computers
b)
Only when programming
c)
Only with flowcharts
d)
Any time to design solutions to problems
50.

Instructions carried out one after another in order is a...

a)

List

b)

Sequence

c)

Collection

d)

Series

51.

Which is the definition of "sequence"?

a)

A set of instructions in a specific order

b)

Where instructions repeat

c)

Code where decisions are made

52.

Which of the following contains an INCORRECT sequence when getting dressed to go out?

a)

Put on socks, put on shoes, put on coat

b)

Put on coat, put on shoes, put on socks

c)

Put on socks, put on coat, put on shoes

53.
What is the correct definition of an algorithm?
a)
An algorithm is a step by step instructions to solve a problem.
b)
An algorithm is a process of baking bread.
c)
An algorithm is a software used to compute numbers.
d)
An algorithm is the process of breaking problems.
54.

Data sent from a Computer is called

a)

Input

b)

Output

c)

Process

55.

Following a recipe would be an example of

a)

Sequence

b)

Selection

c)

Iteration/looping

56.

Step by step procedure to solve any problem___

a)

Flowchart

b)

Algorithm

c)

Program

57.

Algorithm is always written in______ language.

a)

Difficult

b)

Simple

c)

Binary

58.

Algorithm is not very easy to understand.

a)

True

b)

False

c)

May be True

59.

Which of these is NOT an algorithm?

a)

Following recipe instructions

b)

Working out how an engine works

c)

Tying your shoelaces

d)

Making a cup of coffee

60.

What does an algorithm need to be (choose more than 1)

a)

Clear instructions

b)

Exact

c)

Easy to understand

d)

Complex

61.

Here is a list of tasks that you do while posting a letter. Find out the missing sub-task.

(a) Write the letter.

(b) Write the address on the envelope.

(c) Post the letter.

a)
b)
c)
d)
62.

Brushing your teeth is a

a)

task

b)

sub-task

c)

sequence

d)

algorithm

63.

A complete algorithm helps in performing a specific task.

a)

True

b)

False

64.

The steps of an algorithm can be followed in any order to produce the same result.

a)

True

b)

False

65.

What is Algorithm?

a)

First step of programming language

b)

Last step of programming language

66.

An Algorithm has 4 main characteristics. It should be....

a)

Input, Understandable, Finiteness and Generality

b)

Input, Output, Uniqueness, Generality, Finiteness and Definiteness

c)

Input, Understandable, Infinite and precise

d)

Input, Understandable, Uniqueness and Finiteness

67.

Start

Put your hand on the doorknob

Turn the doorknob to the side until it unlocks the door

Push or pull the door to open it

End

..................................................

What would be an appropriate title for this algorithm?

a)

How to push a door

b)

Steps to touch a doorknob

c)

Steps to stand in front of a door

d)

How to open a door

68.

What is an Algorithm?

a)

A picture that you use to make a program

b)

A precise set of instructions

c)

Shapes and symbols connected together

d)

Breaking a problem down into smaller tasks

69.

Finding and fixing errors in programs

a)

Defining

b)

Decompose

c)

Debugging

d)

Fixing

70.

What is the definition of a variable?

a)

Something that is stored by the computer but the value changes.

b)

Something used by the computer

c)

Something that cannot be changed

d)

Something that is not stored but the value changes

71.

a 'sequence' is

a)

a clever piece of computer code

b)

a programming language

c)

a set of instructions carried out in order

d)

a piece of code that is rarely used

72.

Interpret the following code. how many steps will the sprite take in total?

a)

5

b)

-5

c)

10

d)

0

73.

Definition: Writing instructions in special languages

a)

algorithm

b)

coding

c)

function

d)

loop

74.

Definition: Repeating a section of code

a)

algorithm

b)

variable

c)

function

d)

loop

75.

Definition: Refining

a)

iterating

b)

variable

c)

function

d)

loop

76.
A set of instructions that tells the computer what to do is a:
a)
Code
b)
Computer Program
c)
Function
d)
Object
77.
A single sentence that tells the computer to do something is:
a)
Code
b)
Computer Program
c)
Function
d)
Object
78.
A conditional statement is also referred to as a(n):
a)
Question
b)
If/Then Statement
c)
Object
d)
Syntax
79.

________ is a series of instructions that are followed to complete a task or solve a problem.

a)

instructions

b)

algorithms

c)

computers

d)

recipe

80.

Algorithms exist all around us.

a)

True

b)

False

81.

____________ can be considered an example of an algorithm

a)

answer to a question

b)

name of a person

c)

favorite subjects

d)

a recipe for making pancake

82.

An algorithm is a set of __________ followed to complete a task.

a)

values

b)

points

c)

scores

d)

instructions

83.

An algorithm should be in the right order.

a)

True

b)

False

84.

When you write an algorithm you need to include ________, step-by-step instructions.

a)

precise

b)

multiple

c)

ambiguous

d)

interesting

85.

The options below contain the instructions for making a smoothie: Which one should come first?

a)

Put the lid on the blender.

b)

Add fruit to the blender.

c)

Switch the blender on.

d)

Add milk to the blender.

86.

Which of the following is not an example of a programming language?

a)

Scratch

b)

python

c)

english

d)

blockly

87.

An algorithm should be made up of....

a)

Long paragraphs

b)

Very descriptive text

c)

Stories and adventures

d)

Short numbered statements

88.

An operating system is a----------------

a)

Application software

b)

Web browser

c)

Hardware

d)

System software

89.

RAM is type of --------

a)

Hardware

b)

Secondary memory

c)

Input Device

d)

Primary memory

90.

Software has two types--------

a)

Application and hardware

b)

Keyboard and Operating system

c)

System software and Application software

d)

Operating system and Printer

91.

Another name for a module in a program is

(a)  

92.

Write a program that will calculate and output the area of a circle from a radius given.

Which of the following would be variables used

a)

Pi, Radius

b)

Area, Radius

c)

Pi, Area

d)

Pi, Area, Radius

93.

The diagram displayed is likely to be a

(a)  

94.

What is an IPO chart used for?

a)

It is an algorithm

b)

It breaks the problem down into significant parts

c)

Top down design

d)

stepwise refinement

95.

Which of the following in NOT AN ALGORITHM?

a)

Pseudocode

b)

Flowchart

c)

IPO Chart

d)

Narrative

96.

This type of algorithm explains the steps using statements

(a)  

97.

A value in your program that stays the same is called a

a)

Problem

b)

Constant

c)

Variable

d)

Algorithm

98.

A program is written to store the age of three students and the average age.

What is the ideal data type for age1, age2 and age3?

a)

Real number

b)

Integer

c)

Character

d)

Boolean

99.

A program is written to store the age of three students and the average age.

What is the ideal data type for average_age?

(a)  

100.

This datatype only stores one value, True or False

(a)  

101.

A program is written to store an item name and Item price.

What is the ideal data type for item_name?

(a)  

102.

Which of the following are not a good examples of variable names

a)

BalconyCost1

b)

Balcost1

c)

Bal_cost1

d)

1bal_cost

e)

Balcony cost

103.

This types of algorithm is close to real programming

(a)  

104.

All of the following are programming data types except

a)

String

b)

Modules

c)

Boolean

d)

Float

105.

An IPO chart is written to find the sum of three numbers. After the processing instruction to "Accept input", what is the next instruction that would follow?


Uses the variables n1, n2, n3, tot

(SEPERATE EACH PART WITH A SPACE)

(a)  

106.

This datatype only accepts whole positive and negative numbers

(a)  

107.

Which of the following are characteristics of a good algorithm?

a)

Repeat the same instructions unnecessarily

b)

Be clear and easily understood

c)

Use different names for the same variables

d)

Be written in sequence (in order)

e)

Must End

108.

Breaking down a problem into manageable components is called

a)

Problem Definition

b)

Algorithm

c)

Analyzing

d)

Programming

109.

Step by step instructions to solve a problem using computer codes

a)

Algorithm

b)

Top down design

c)

sequence

d)

Program

110.

Breaking down Sub components into even smaller tasks is referred to as

a)

Top down design

b)

Stepwise refinement

c)

Structured diagram

d)

Module

111.

Commonly used functions that can be used in another program

a)

Library Routines

b)

Functions

c)

Module

d)

Variable

112.

Piece of code that does something specific

a)

Library Routines

b)

Module

c)

Variable

d)

Datatype

113.

All the following can be used to help analyze a problem EXCEPT

a)

Top down design

b)

Stepwise refinement

c)

algorithms

d)

IPO chart

114.

A variable can be best defined as

a)

A value that stays the same in your program

b)

A value that is known in your program

c)

Value that can change in your program and is unknown

d)

a)A value that is input by the user

115.

In programming, what is iteration?

a)

The repetition of steps within a program

b)

The order in which instructions are carried out

c)

A decision point in a program

d)

Testing a program to make sure it works

116.

FOR loops are

a)

loops which run an unknown number of times

b)

loops which run for a specific number of times

c)

the same as if statements

d)

not part of programming

117.

Which kind of loop would be used?


I need a program that will keep letting me add a monthly payment for 12 months.

a)

FOR Loop

b)

WHILE Loop

118.

Which kind of loop would be used?


I need a revision program that will run through revision questions 4 times.

a)

FOR Loop

b)

WHILE Loop

119.

Look at the following code, what will it generate

a)

1,2,3,4,5,6,7,8,9,10,11,12

b)

0,1,2,3,4,5,6,7,8,9,10,11,12

c)

1,2,3,4,5,6,7,8,9,10,11,12,13

d)

0,1,2,3,4,5,6,7,8,9,10,11,12,13

120.

What does the following program display?

a)

1,2,3,4

b)

1,2,3,4,5

c)

counter,counter,counter,counter,counter

d)

0,1,2,3,4,5

121.

When do you know when you come to the end of the loop?

a)

Its states End loop

b)

The command End is given

c)

The indentation stops

122.

what is the name of the variable used in the following code?

a)

counter

b)

print

c)

for

d)

#

123.
What symbol do you use to make a comment in Python?
a)
@
b)
¬
c)
;
d)
#
124.
What type of loop is used when you know how many times you want to repeat something?
a)
A WHILE Loop
b)
An IF function
c)
A FOR Loop
d)
A Variable