WorksheetsCoding Fundamentals Review
Total questions: 38
Worksheet time: 21mins
What’s an algorithm?
The word used to describe all computer codes
Sets of instructions to a computer
A type of hardware used with micro:bit
The area of a MakeCode project that shows how a program looks when run on the micro:bit
What is pseudocode?
The coding blocks in MakeCode
A detailed step-by-step plan for your program
A coding language
A computer program
What is an event in programming?
A function that runs automatically
An action that causes something to happen
A type of variable
A loop in a program
What’s the difference between a constant and a variable?
A constant changes, a variable does not
A constant is a type of loop, a variable is not
A constant does not change, a variable can change
A constant is a function, a variable is not
Which of the following is not a type of variable that we talked about in class?
String
Number
Boolean
iteration
Which of the following is an example of a string variable?
day of the week
temperature
is it snowing
Pi
Which of the following is an example of a number variable?
weather condition
temperature (degrees)
is it Sunday
5
Which of the following is an example of a boolean variable?
month
9
is it raining?
students enrolled
In coding, conditionals tell a computer to do which of the following?
How to do it
To do it faster
When to do it
Where to do it
What is the x and y coordinate location of the LED sprite?
4,4
3,4
3,3
4,3
How could you rewrite this pseudocode with loops? Step forward Turn left Step forward Turn left Step forward Turn left Step forward Turn left
repeat 4 time:
[step forward,
turn left]
step forward
repeat 4 time:
turn left
While x <6:
[step forward,
turn left]
repeat 2 times
[step forward,
turn left]
What type of variable is the (x,y) coordinate?
Sprite
Number
String
Boolean
What is pseudocode?
The coding blocks in MakeCode
A way of writing algorithms that uses plain English text
A coding language
A type of hardware used with micro:bit
Information with values that do not change during a program is known as a _______.
Constant
Variable
Derivative
Boolean
Information with values that can change during a program is known as a _______.
Constant
Variable
Derivative
Boolean
True or False: A conditional statement must have all the following: If, then, else, else if.
True
False
What's another word for iteration?
Condition
Input
Repeat
Processing
_______ is a rule or criteria that must be met for an action to be carried out.
Iteration
Conditional statement
Variable
Function
Which of the following is not a way that loops are beneficial when coding?
Saves time
Fewer lines of code to debug
Shorter programs
Removes the need to use variables
A repeat loop _______.
Runs a command as long as a certain condition is met
Runs a command a set number of times
Runs a command n times with a variable to increment each time
Runs in the background continuously as long as the program is running
A for loop _______.
Runs a command as long as a certain condition is met
Runs a command n times
Runs a command n times with a variable to increment each time
Runs in the background continuously as long as the program is running
A while loop __________.
Runs a command as long as a certain condition is met
Runs a command n times
Runs a command n times with a variable to increment each time
Runs in the background continuously as long as the program is running
Which pseudocode best represents the given code?
On button B is pressed: increase the amount spent by 1 and display "-$". Set the value of total balance to the amount earned minus the amount spent. Lastly, display the value of the total balance.
On button B is pressed: decrease the amount spent by 1 and display "-$". Set the value of total balance to the amount earned plus the amount spent. Lastly, display the value of the total balance.
On button B is pressed: increase the amount spent by 1 and display "-$". Set the value of total balance to the amount spent plus the amount earned. Lastly, display the value of the total balance.
On button B is pressed: decrease the amount spent by 1 and display "-$". Set the value of total balance to the amount spent minus the amount earned. Lastly, display the value of the total balance.
According to the flowchart, what happens when the variable C is less than eleven?
Print C
and increase c by 1
The program stops.
The program loops back to the start.
The program skips the next step.
Which of the following is not an example of a number variable
basketball score
running speed
height
favorite color
Which of the following is not an example of a string variable?
current city
today's lunch menu
amount of questions correct
shirt color
What is the primary purpose of a loop in programming?
To execute a block of code once
To repeat a block of code multiple times
To store data
To define a variable
Which of the following is an example of a constant?
is it raining?
current temperature
user age
PI
What is the main purpose of using pseudocode?
To create a visual representation of a program
To write code in a specific programming language
To outline the logic of a program in plain language
To compile a program
Which of the following is an example of a number variable?
username
favorite movie
age
is it sunny?
What is the main purpose of using variables in programming?
To execute code multiple times
To define a constant value
To create a loop
To store data that can change
Which of the following best describes a Boolean variable?
A variable that stores numerical values
A variable that stores a sequence of characters
A variable that can only hold true or false values
A variable that can hold any type of data
Which of the following is an example of a string variable?
temperature
is it raining?
user age
username
Which of the following best describes a string variable?
A variable that can only hold true or false values
A variable that can hold any type of data
A variable that stores a sequence of characters
A variable that stores numerical values
The action of doing something over and over again.
Iteration
Bugging
Programming
pseudocode
What are the pink blocks an example of?
Conditionals
Loops
Functions
variables
What concept repeats whatever is inside it?
Conditional
Variable
Loop
Function
Which option bellow correctly plots these points (3,2), (1,4), (0,2)
