WorksheetsUnit 3 Quiz (Algorithms/Flowcharts and CodeHS 3.1 - 3.6)
Total questions: 23
Worksheet time: 12mins
Name
Class
Date
1.
Which of these is a valid Karel command?
a)
move;
b)
MOVE
c)
move();
d)
move()
2.
What is a street in a Karel world?
a)
A row
b)
A column
c)
A single point
d)
Karel's position
3.
What is an avenue in a Karel world?
a)
A row
b)
A column
c)
A single point
d)
Karel's position
4.
If Karel starts at Street 1 and Avenue 3 facing East, what street (row) and avenue (column) will Karel be on after this code runs?
a)
Street 2 and Avenue 5
b)
Street 4 and Avenue 4
c)
Street 2 and Avenue 6
d)
Street 6 and Avenue 2
5.
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.
6.
If Karel starts at Street 3 and Avenue 2 facing North, what street (row) and avenue (column) will Karel be on after this code runs?
a)
Street 6 and Avenue 2
b)
Street 6 and Avenue 1
c)
Street 2 and Avenue 5
d)
Street 5 and Avenue 2
7.
If Karel is facing North and the code is: turnLeft(); turnLeft(); Which way will Karel be facing now?
a)
North
b)
South
c)
East
d)
West
8.
The flowcharts have got special set of ___________ to represent the instructions.
a)
graph
b)
symbols
c)
charts
9.
If Karel is facing South and the code is: turnAround(); which way will Karel be facing?
a)
North
b)
South
c)
East
d)
West
10.
If Karel is facing East and the code is: turnLeft(); which way will Karel be facing?
a)
North
b)
South
c)
East
d)
West
11.
What is this symbol used for when making a flow diagram?
a)
Decision
b)
Process
c)
Input/output
12.
In a Karel Command, which of the following applies?
a)
No spaces in the command
b)
Needs to match exact capitalization
c)
Every command ends with ();
d)
All of the Above
13.
How many times should Karel turn left in order to turn right?
a)
1
b)
2
c)
3
d)
4
14.
What can be used to teach Karel to turn right?
a)
Variables
b)
Functions
c)
Dog Treats
d)
Karel can already turn right
15.
What is used to connect the flowchart symbols together?
a)
Rectangles
b)
Lines
c)
Arrows
d)
Patterns
16.
True or False: Blank lines (spaces) are ignored when Karel executes commands.
a)
True
b)
False
17.
Walls represent the borders of Karel's world. Can Karel go through these walls?
a)
Yes
b)
No
18.
Which function will teach Karel how to spin in a circle one time?
a)
Option 1
b)
Option 2
c)
Option 3
d)
Option 4
e)
19.
How many times should a start function be defined in a program?
a)
0
b)
1
c)
However many you like.
20.
How many times should you call the start function in a program?
a)
0
b)
1
c)
2
d)
However many you like.
21.
Why do we use functions in programming
a)
To break down our program into smaller parts
b)
To avoid repeating code
c)
To make our program more readable
d)
All of the above
22.
Rules for defining a Function include:
a)
Name should start with a letter and cannot have spaces.
b)
The name should describe what the function does.
c)
The code goes between the { and } character and is called the function body.
d)
All of the above
23.
What is top down design and decomposition?
a)
A way that you can create designs on a computer to put on a web page.
b)
A way of designing your program by starting with the biggest problem and breaking it down into smaller and smaller pieces that are easier to solve.
c)
A way of designing your programs starting with the individual commands first.
d)
A way to use loops and classes to decompose the problem.
100 %
