Font size
WorksheetsALGORITHIMC INTELLIGENCE
Total questions: 124
Worksheet time: 1hrs 14mins
Which kind of loop would be used?
I need a revision program that will run through revision questions 4 times.
FOR Loop
WHILE Loop
Which type of loop iterates until instructed otherwise?
FOR loop
WHILE loop
FOR loops are
loops which run an unknown number of times
loops which run for a specific number of times
the same as if statements
not part of programming
In programming, what is iteration/looping?
The repetition of steps within a program
The order in which instructions are carried out
A decision point in a program
_________is a collection of instructions that can be executed by a computer to perform a specific task.
Program
Algorithms
Flowchart
i = 1
while False:
if i%2 == 0:
break
print(i)
i += 2
1
1357......
1234......
none of the mentioned
i = 1
while True:
if i%7 == 0:
break
print(i)
i += 1
123456
1234567
error
none
How many times the following loop will execute:
i = 1
while True:
print(i)
i += 2
0
2,4,6,8,..................
1,3,5,7,9,.............
1,2,4,6,8......................
The program above:
prints all the odd numbers between 1 and 20
prints all even numbers between 1 and 20
print all the odd numbers between 1 and 21
prints all the even numbers between 1 and 21
for loop in python works on:
1.range
2.iteration
3.Both of the above
4.None of the above
What is a set of instructions that a computer uses to solve a problem?
Algorithm
Processing
Storage
Output
This type of algorithm involves asking a question and a choice is made.
Sequence
Selection
Iteration/Looping
This type of algorithm involves repeating instructions.
Sequence
Selection
Iteration/Looping
This type of algorithm involves instructions done one after another.
Sequence
Selection
Iteration/Looping
Rejecting
Reclining
Repeating
What type of iteration is in this story?
Sequence
Selection
Iteration/Looping
What type of algorithm is in this story?
Sequence
Selection
Iteration/looping
What type of algorithm is shown in this story?
Sequence
Selection
Iteration/looping
Instructions carried out one after another in order is called
Sequence
Selection
Iteration/Looping
Following a recipe would be an example of
Sequence
Selection
Iteration/looping
Hammering a nail into the wall would be an example of
Sequence
Selection
Iteration/Looping
Deciding to wear a jacket or not to school would be an example of
Sequence
Selection
Iteration/looping
Indicates the beginning or end of a program flow in your diagram.
algorithm
subroutine
terminator
preparation
Keep repeating a part of a flowchart with this construct
loop
algorithm
document
diamond
Make a decision in your flowchart with this symbol
document
rectangle
diamond
display
Defines the relationship of one element to another in a flowchart.
subroutine
algorithm
terminator
arrow
Coding uses "For in what type of algorithm
Sequence
Selection
Iteration
What is an algorithm?
Patterns and trends used to solve a problem
A set of step-by-step instructions to resolve a problem
A programming language
What are algorithms used for?
To plan out the solution to a problem
As a platform to program a solution
To test a solution to a problem
Which of these is NOT an algorithm?
Following recipe instructions
Working out how an engine works
Tying your shoelaces
Making a cup of coffee
What does an algorithm need to be (choose more than 1)
Clear instructions
Exact
Easy to understand
Complex
When can an algorithm be used?
Only with computers
For programming
To design a solution to any problem
What is decomposition?
Searches the computer's memory for data
Repeats a program
Getting small part of a problem and adding them together
Breaking down a complex problem
What is abstraction?
Removal of certain details, keeping relevant the information
Stores data in a program for retrieval
Freedom from representing art
Detects errors while program is running
If it is AFTER 7am, what do you need to do?
Take the bus
Take the subway
Check the time
Leave home
What should be considered when designing an algorithm?
If there is more than one way to solve the problem
If the correct hardware is being used
If the correct software is being used
You are at the yellow arrow, pointing in the direction indicated. How would you move to fill in the 2 black squares?
Straight, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 1, Fill Square
Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 1, Fill Square
Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn right, Straight x 1, Fill Square
Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 2, Fill Square
What is an algorithm?
Patterns and trends used to solve a problem
A set of step-by-step instructions to resolve a problem
A programming language
What are algorithms used for?
To plan out the solution to a problem
As a platform to program a solution
To test a solution to a problem
How can an algorithm be represented?
As a flowchart only
As pseudocode only
As a flowchart or pseudocode
What is a flowchart?
A diagram that represents a set of instructions
A high-level language that has specific syntax
A way of describing a set of instructions that doesn’t use specific syntax
What is the correct symbol for a process instruction in a flowchart?
A rectangle
A parallelogram
A square
What is the correct symbol for an input in a flowchart?
A parallelogram
A rectangle
A square
What links each instruction in a flowchart?
A line
A double line
An arrow
What is the correct symbol for a decision in a flowchart?
A rectangle
A diamond
A square
What is the correct symbol for an output in a flowchart?
A parallelogram
A rectangle
A diamond
Algorithms are 1 of the 4 techniques of Computational Thinking
True
False
Instructions carried out one after another in order is a...
List
Sequence
Collection
Series
Which is the definition of "sequence"?
A set of instructions in a specific order
Where instructions repeat
Code where decisions are made
Which of the following contains an INCORRECT sequence when getting dressed to go out?
Put on socks, put on shoes, put on coat
Put on coat, put on shoes, put on socks
Put on socks, put on coat, put on shoes
Data sent from a Computer is called
Input
Output
Process
Following a recipe would be an example of
Sequence
Selection
Iteration/looping
Step by step procedure to solve any problem___
Flowchart
Algorithm
Program
Algorithm is always written in______ language.
Difficult
Simple
Binary
Algorithm is not very easy to understand.
True
False
May be True
Which of these is NOT an algorithm?
Following recipe instructions
Working out how an engine works
Tying your shoelaces
Making a cup of coffee
What does an algorithm need to be (choose more than 1)
Clear instructions
Exact
Easy to understand
Complex
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.
Brushing your teeth is a
task
sub-task
sequence
algorithm
A complete algorithm helps in performing a specific task.
True
False
The steps of an algorithm can be followed in any order to produce the same result.
True
False
What is Algorithm?
First step of programming language
Last step of programming language
An Algorithm has 4 main characteristics. It should be....
Input, Understandable, Finiteness and Generality
Input, Output, Uniqueness, Generality, Finiteness and Definiteness
Input, Understandable, Infinite and precise
Input, Understandable, Uniqueness and Finiteness
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?
How to push a door
Steps to touch a doorknob
Steps to stand in front of a door
How to open a door
What is an Algorithm?
A picture that you use to make a program
A precise set of instructions
Shapes and symbols connected together
Breaking a problem down into smaller tasks
Finding and fixing errors in programs
Defining
Decompose
Debugging
Fixing
What is the definition of a variable?
Something that is stored by the computer but the value changes.
Something used by the computer
Something that cannot be changed
Something that is not stored but the value changes
a 'sequence' is
a clever piece of computer code
a programming language
a set of instructions carried out in order
a piece of code that is rarely used
Interpret the following code. how many steps will the sprite take in total?
5
-5
10
0
Definition: Writing instructions in special languages
algorithm
coding
function
loop
Definition: Repeating a section of code
algorithm
variable
function
loop
Definition: Refining
iterating
variable
function
loop
________ is a series of instructions that are followed to complete a task or solve a problem.
instructions
algorithms
computers
recipe
Algorithms exist all around us.
True
False
____________ can be considered an example of an algorithm
answer to a question
name of a person
favorite subjects
a recipe for making pancake
An algorithm is a set of __________ followed to complete a task.
values
points
scores
instructions
An algorithm should be in the right order.
True
False
When you write an algorithm you need to include ________, step-by-step instructions.
precise
multiple
ambiguous
interesting
The options below contain the instructions for making a smoothie: Which one should come first?
Put the lid on the blender.
Add fruit to the blender.
Switch the blender on.
Add milk to the blender.
Which of the following is not an example of a programming language?
Scratch
python
english
blockly
An algorithm should be made up of....
Long paragraphs
Very descriptive text
Stories and adventures
Short numbered statements
An operating system is a----------------
Application software
Web browser
Hardware
System software
RAM is type of --------
Hardware
Secondary memory
Input Device
Primary memory
Software has two types--------
Application and hardware
Keyboard and Operating system
System software and Application software
Operating system and Printer
Another name for a module in a program is
(a)
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
Pi, Radius
Area, Radius
Pi, Area
Pi, Area, Radius
The diagram displayed is likely to be a
(a)
What is an IPO chart used for?
It is an algorithm
It breaks the problem down into significant parts
Top down design
stepwise refinement
Which of the following in NOT AN ALGORITHM?
Pseudocode
Flowchart
IPO Chart
Narrative
This type of algorithm explains the steps using statements
(a)
A value in your program that stays the same is called a
Problem
Constant
Variable
Algorithm
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?
Real number
Integer
Character
Boolean
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)
This datatype only stores one value, True or False
(a)
A program is written to store an item name and Item price.
What is the ideal data type for item_name?
(a)
Which of the following are not a good examples of variable names
BalconyCost1
Balcost1
Bal_cost1
1bal_cost
Balcony cost
This types of algorithm is close to real programming
(a)
All of the following are programming data types except
String
Modules
Boolean
Float
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)
This datatype only accepts whole positive and negative numbers
(a)
Which of the following are characteristics of a good algorithm?
Repeat the same instructions unnecessarily
Be clear and easily understood
Use different names for the same variables
Be written in sequence (in order)
Must End
Breaking down a problem into manageable components is called
Problem Definition
Algorithm
Analyzing
Programming
Step by step instructions to solve a problem using computer codes
Algorithm
Top down design
sequence
Program
Breaking down Sub components into even smaller tasks is referred to as
Top down design
Stepwise refinement
Structured diagram
Module
Commonly used functions that can be used in another program
Library Routines
Functions
Module
Variable
Piece of code that does something specific
Library Routines
Module
Variable
Datatype
All the following can be used to help analyze a problem EXCEPT
Top down design
Stepwise refinement
algorithms
IPO chart
A variable can be best defined as
A value that stays the same in your program
A value that is known in your program
Value that can change in your program and is unknown
a)A value that is input by the user
In programming, what is iteration?
The repetition of steps within a program
The order in which instructions are carried out
A decision point in a program
Testing a program to make sure it works
FOR loops are
loops which run an unknown number of times
loops which run for a specific number of times
the same as if statements
not part of programming
Which kind of loop would be used?
I need a program that will keep letting me add a monthly payment for 12 months.
FOR Loop
WHILE Loop
Which kind of loop would be used?
I need a revision program that will run through revision questions 4 times.
FOR Loop
WHILE Loop
Look at the following code, what will it generate
1,2,3,4,5,6,7,8,9,10,11,12
0,1,2,3,4,5,6,7,8,9,10,11,12
1,2,3,4,5,6,7,8,9,10,11,12,13
0,1,2,3,4,5,6,7,8,9,10,11,12,13
What does the following program display?
1,2,3,4
1,2,3,4,5
counter,counter,counter,counter,counter
0,1,2,3,4,5
When do you know when you come to the end of the loop?
Its states End loop
The command End is given
The indentation stops
what is the name of the variable used in the following code?
counter
for
#
