Font size
WorksheetsProgramming & Logic Unit Review
Total questions: 85
Worksheet time: 43mins
Which of the following is a program that translates other programming languages into machine language?
a. Binary
b. Transistor
c. Assembler
d. Compiler
Which program translates a series of instructions, executes them, and then translates the next series until the program is fully executed?
a. Transistor
b. Interpreter
c. Assembler
d. Compiler
Which of the following is a number system that uses the values 0 and 1, and is the primary language that computers use to communicate?
a. Binary
b. Assembly
c. Decimal
d. Pseudocode
Java, Visual Basic, Python and C++ are examples of what type of programming language?
Machine
Assembly
High-level
Which type of error causes a program to produce incorrect results, such as the sum of two values instead of the difference of two values?
Syntax
Logic
Runtime
System
Which type of error is usually identified by the compiler or interpreter?
Syntax
Logic
Runtime
System
Which tool used to plan computer programs is an English-like representation of program steps?
Debugging
Flowchart
Assembly
Pseudocode
The general problem-solving strategy includes the following activities: understand the problem, devise a plan, test the plan, review the result, and revise. What is the next step in the process?
Return to Step 1 and repeat the process until the solution is found.
Create procedures needed to execute the solution.
Create a series of statements using code.
Which tool used to plan computer programs is a pictorial representation of program steps?
Debugging
Flowchart
Assembly
Pseudocode
Logical thinking is:
the process of solving a problem.
progressively moving from one connected thought to another.
systematic steps to correct an error.
the steps required to create a solution.
There are (a) types of programming errors.
What is not included in a testing plan?
Debugging
Desk checking
Testing individual components
Creating new algorithms
What type of error occurs while the program is running?
Syntax
Logic
Runtime
System
What is the pencil and paper method of finding errors?
Debugging
Desk checking
Slicing
Testing individual components
Problem solving is:
devising a set of step-by-step instructions to solve a problem or perform a task.
using a pencil and paper to work through an existing program by hand.
determining whether an existing program performs its intended task and works efficiently.
translating a program’s instructions into machine language.
What is the name of the process that identifies errors and makes necessary corrections to meet the program’s intended outcome?
Debugging
Flowchart
Assembly
Pseudocode
Which of the following statements are correct when trying to solve a complex problem?
Confusion and frustration are often part of the process.
A deep understanding of the problem is not necessary.
Testing is rarely required.
Finding solutions to problems are quick and simple.
Which of the following statements are not correct about desk-checking?
It is a computerized process.
It is a simple method using a pencil and paper.
It is a manual process.
It is very effective.
Which programming structure continues to repeat actions while a condition remains true?
Loop
Sequence
Selection
Object
Which programming structure performs a set of instructions in the order they appear?
Loop
Sequence
Selection
Object
When a computer carries out a program's instructions, it is called (a) the program.
Which programming structure makes a decision in order to determine which set of instructions to carry out?
Loop
Sequence
Selection
Object
The if/else instruction set is considered a(n) ___ structure.
loop
sequence
selection
object
The whole instruction set is considered a(n) ________ structure.
loop
sequence
selection
object
What is a control structure?
Determine the order in which instructions are executed, as well as the number of times or even whether an instruction is executed
Pseudocode
Determines whether an existing program performs its intended task and works efficiently
Create procedures needed to execute the solution.
There are ____ main control structures.
2
5
6
3
Which of the following is not a common loop statement?
Do-while
While
Stop
For
There are ____ basic types of loops.
6
3
5
2
Which of the following are types of loops?
Count controlled
Text controlled
Program controlled
Bug controlled
The main logic control structures include:
Text, numbers and data
Control, do-while, selection
Selection, control and loop
Loop, control, and object
Which structure allows the computer to execute an instruction only if a certain condition exists?
Logic
Selection
Control
Loop
An do-while statement tests a condition and is an example of a:
Logic
Selection
Control
Loop
This control structure will execute each instruction one after another until it reaches the end of the program.
Logic
Selection
Control
Loop
What control structure is also called iteration?
Logic
Selection
Control
Loop
Named memory locations whose contents can vary are called:
expressions.
variables.
programs.
algorithms.
Which of the following is a valid variable name in programming?
First Name
1Name
Phone#
phoneNumber
Consider the following expression: Set grandTotal = Total + 2. If the Total variable has the value 5, what is the value of grandTotal after the expression is evaluated?
Total2
3
7
5
Which programming term means joining two strings together?
Initializing
Declaring
Evaluating
Concatenation
Which of the following is used by the computer to determine how the data stored in a variable can be manipulated?
Data type
Name
Operator
Assignment
Which type of operator only returns the values true and false?
Assignment
Arithmetic
Comparison
Procedural
Which data type contains only two values and is used to compare conditions?
Integer
Boolean
String
Floating point
What is the function of the <= operator?
Greater than or equal to
Less than or equal to
Not equal to
And equal to
Which choice lists examples of logical (Boolean) operators?
&&
||
++
!
!=
You must include this step along with initializing before you can use a variable.
Evaluate
Declare
Compare
Assign
According to the variable naming rules, names must begin with:
Number
Symbol
Space
Letter or underscore
Telling a program that a specific named variable exists is called:
declaring
evaluating
initializing
naming
Which of the following is not a data type?
Character
String
Integer
Object
Which of the following is considered a character data type?
5
6.7
John
?
A whole number that does not contain a decimal is an (a) .
What is the term for a combination of variables, values, functions and operators?
Expressions
Variables
Programs
Algorithms
Expressions are evaluated using ___.
variable rules
order of operations
rules of initializing
declaration
Besides the arithmetic operator, there are ___ other types of operators.
5
4
3
2
Arithmetic operators include addition, subtraction, multiplication, and division. Which of the following is not an arithmetic operator?
Increments by 1
Decrements by 1
Comparison
Modulus
Named units of code that perform a task or cause an action to take place are called:
events
functions
classes
objects
Consider the following pseudocode: Get the Sqrt of 9. This pseudocode is an example of what?
An object that contains a parameter
A class that contains an argument
An event that contains a parameter
Which of the following is a function used to tell the program what to do when a certain action takes place?
Event
Argument
Event handler
Parameter
Which programming component is used when the mouse is clicked to trigger the execution of a specific action?
Event
Argument
Event handler
Parameter
What are the benefits of using functions?
Functions make the program more efficient.
Functions make the program run without errors.
Functions create new lines of code.
Functions finds errors in the program.
Which of the following is not a common function in Scratch?
Random
Round
Scientific
Formula
Function blocks with rounded ends returns:
string or numeric information.
boolean information.
current values.
past values.
Function blocks with angled or pointed ends returns:
string or numeric information.
boolean information.
current values.
past values.
Function blocks with check boxes return:
string or numeric information.
boolean information.
current values.
past values.
In Scratch, event blocks have which of the following characteristics?
a. rounded tops and bumps on the bottom
b. a bump on the top and rounded bottoms
c. a bump on the top and bottom
d. rounded tops and bottoms
In Scratch, event blocks run the block __ when the triggering event occurs.
a. above
b. below
c. to the right
d. to the left
What is the difference between an event and an event handler in programming?
a. The event handler triggers the event
b. The event triggers the event handler
c. Events and triggers are the same
d. Triggers do nothing
What is an argument in programming?
a. an object that contains a parameter
b. event that contains a parameter
c. a value that is passed to a routine
d. a function that contains an argument
Which choice lists the two main programming approaches?
a. Procedural and object-oriented
b. Structural and procedural
c. Sequential and structural
d. Object-oriented and sequential
Which of the following terms describes a group of objects with common properties?
a. Function
b. Event
c. Class
d. Parameter
When a class is used to build an object, the object is called a(n) (a) of the class.
What is the term for the various characteristics of an object?
Properties
Instances
Arguments
Methods
The actions that an object can perform are called __________.
arguments
parameters
methods
classes
A(n) __________ is the variable that holds the value needed by the method.
argument
parameter
object
instance
What is the term for the value that is passed to a method when it is called so it knows what to do?
Argument
Parameter
Object
Instance
The programming method that uses steps in an orderly manner:
procedural
object oriented
methodical
sequential
The programming method that utilizes reused items:
procedural
object oriented
methodical
sequential
Objects are created based on:
function
event
class
parameter
An alternate term for class is:
blueprint
instance
argument
method
Which of the following is not considered a characteristic of an object?
Size
Color
Type
Method
In Scratch, arguments are represented as:
Ovals or hexagons
Squares
Rectangles
Circles
In Scratch the default Boolean argument is:
True
False
1
0
In Scratch, Boolean blocks have angled input areas for the following reasons:
To insert inside other blocks
To run before other blocks
To run after other blocks
To perform a wait routine
Python is an example of a programming language.
True
False
Which is not a computer programming language?
C++
Spanish
CoffeeScript
Java
