wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Ucertify Programming and Logic Review

Total questions: 40

Worksheet time: 1hrs 2mins

Name
Class
Date
1.

Mario has begun learning a programming language. He thought that he would write the code in plain English. However, programming languages require that he learn and follow a special set of rules referred to as:

a)

syntax.

b)

machine language.

c)

assembly.

d)

executing.

2.

Computers organize the zeros and ones that represent an instruction into a series of eight pieces. This series of eight ones or zeros is known as:

a)

data.

b)

byte.

c)

code.

d)

a bit.

3.

Consider the following code:

turnRight ();

for (var count = 0; count < 5; count++) {

  moveForward ();

}

a)

assembly language.

b)

programming language.

c)

computer language.

d)

machine langugage.

4.

Basic mathematics taught in elementary school is a base 10 number system (which makes it easy if you are using your fingers). Computers use a different number system, known as:

a)

base 2

b)

base 1

c)

base 8

d)

base 6

5.

Frank has written code for his video game that makes the character move to the left while the player presses the left-arrow key. Which type of control structure is this?

a)

Selective

b)

Functional

c)

Object

d)

Loop

6.

What enables a programmer to determine the order in which instructions are executed, as well as the number of times (or even if) an instruction is executed?

a)

Program Flow

b)

Control Structure

c)

Program syntax

d)

Logic Structure

7.

What are the three main programming structures?

a)

Sequence, selection, loop

b)

Structured, object-oriented, procedural

c)

Machine, assembly, high-level

d)

Java, Python, Visual Basic

8.

Sylvia creates a program that asks and stores a user's name. It then displays the user's name every time there is a new prompt for the user to complete. What is used to store the name in the computer's memory that the computer can access and manipulate, when running Sylvia's program?

a)

Variable

b)

File

c)

Data

d)

Operator

9.

Romina wants to input whole numbers (that do not contain a decimal) into variables in the inventory program she is coding. What variable data type should she use?

a)

Floating point

b)

String

c)

Boolean

d)

Integer

10.

Charles is coding a role-playing game. He has created code that asks a player for their name and assigns it to the "name" variable. Charles assigns the first value for the variable as Player1 until a player inputs their information. What is the term for assigning this value for the "name" variable?

a)

Encoding

b)

Declaring

c)

Executing

d)

Initializing

11.

Carrie is using object-oriented programming to code her latest video game. In the game, she has objects that are little monsters. Each is unique in their own way (size, color, etc.). To create each of these unique looking objects, she needs to change the:

a)

arguments.

b)

properties.

c)

classes.

d)

methods.

12.

Sean does not understand the relationships between objects, values, properties and classes. His technology teacher explains:

a)

objects created using the same class may contain different properties; however, the properties must contain the same values.

b)

objects created using the same class can contain different properties and property values.

c)

objects created using the same class must contain the same properties and property values.

d)

objects created using the same class must contain the same properties; however, the properties may contain different values.

13.

Kiera is writing the code for a new video game. She is creating a character who waves to other characters. Every time the game player says "hello" to the character (by pressing the "H" key), the character waves back. The code to make the character wave is very long, so Kiera decides to name the segment of code WAVE. Now every time she needs the wave series of code she simply inputs WAVE. What has Kiera created?

a)

A function

b)

An instance

c)

A iteration

d)

An object

14.

Mason is programming a robot that will use a sensor to follow a black line on a white floor. Which type of expression will he use for the black or white sensor that will return results in the value of either true or false?

a)

Boolean

b)

Selection

c)

Concatenation

d)

Conditional

15.

Consider this recipe algorithm:

Preheat oven to 375 degrees

Grease and flour a cake pan

Add the next ingredient to the large bowl

Stir the contents of the bowl until blended

Pour the batter into the cake pan

Bake 30 minutes

Which instruction in this algorithm would be considered a loop structure?

a)

Bake 30 minutes

b)

Preheat oven to 375 degrees

c)

Pour the batter into the cake pan

d)

Add the next ingredient to the large bowl

Explanation

16.

During testing, your development team identified some problems in the first program draft. What is the next step you need to complete?

a)

Review the result of the solution.

b)

Test the plan.

c)

Use logic to plan a solution.

d)

Revise the plan until a solution is found.

17.

Consider this example:

if <this is true>

do this

else

do something else

a)

a compiler

b)

a flowchart

c)

syntax.

d)

pseudocode.

18.

Lucy is sharing her program with a student at another school. She is having a video conference with the students and shows a section of code that she is working on. Lucy describes it as the decision control structure. The other student is confused. What other name can this structrure be called?

a)

Object

b)

Selection

c)

Sequence

d)

Loop

19.

Which program translates a number of programs instructions, waits for computer to execute them, and then translates the next series, until the program is fully executed?

a)

Assembler

b)

Compiler

c)

Application

d)

Interpreter

20.

The robotics team has created a solid design that can physically accomplish all of their tasks for competition. Now they must create the program that will control the robot. The code could be massive, and be difficult for them to write and for the computer to execute. They decide to break problems into smaller, logical problems to make them easier to execute. Which type of programming is this?

a)

Structured

b)

Scripting

c)

Object-oriented

d)

Functional

21.

Mr. Simmons asks the class to create an algorithm to find out if each number on a list is odd or even. Peter creates a flowchart to help visualize his algorithm. The first step is to select a number from the list. What is the next logical step to solve the problem?

a)

Multiply the selected number by two.

b)

Divide the selected number by two.

c)

Divide the number of items remaining on the list by two.

d)

Count the number of items in the list.

22.

Using short informal phrases to describe program functions (such as "if total is more than 10, add discount") is called:

a)

pseudocode

b)

flow charts.

c)

formatiing.

d)

logical thinking.

23.

Aaron would like to create a program that allows the user to find the average of five numbers. He has asked for your help. Below is the pseudocode Aaron has written:

Enter five numbers

Add the numbers entered

Multiply the sum of numbers entered by 5

display the result

a)

the program will provide the correct answer.

b)

the program needs to provide the five numbers to the user.

c)

the program needs to multiply the five numbers entered, not added.

d)

the program needs to divide the sum of the numbers entered by 5, not multiply.

24.

Melissa is testing a new video game for her roommate. She is playing the game and gets to the door at the end of the first level. As she opens the door, the game just stops running. What is most likely causing the game to stop?

a)

A debugging error

b)

A logic error

c)

A syntax error

d)

A runtime error

25.

Scott has written a program to add together a group of numbers and then divide the total by the number of items added to produce the average value. When he tested the program, he noticed that the program is multiplying the total by number of items, not dividing as he intended. Which type of programming error has mostly likely occurred?

a)

Computer

b)

Logic

c)

Runtime

d)

System

26.

Luigi has created a program for a game that has a "monster" character appear from a "cave" in the middle of the screen, move randomly off the edge of the screen and then reappear in the cave. It repeats while the game is played. What is another term for this loop control structure?

a)

Object

b)

Selection

c)

Iteration

d)

Sequence

27.

Amber is programming a robot with a color sensor to follow a black curvy line on a white floor. She has programmed the robot to move forward, curving to the left if it senses black on the floor, and curving right if it does not sense black. She is hoping this will allow the robot to follow the black line. Which type of control structure has Amber written?

a)

Functional

b)

Selection

c)

Sequence

d)

Loop

28.

What enables a programmer to determine the order in which instructions are executed, as well as the number of times (or even if) an instruction is executed?

a)

Control Stucture

b)

Logic structures

c)

Program Flow

d)

Program Syntax

29.

Consider the loop control structure in programming. Which term describes a loop that continues repeating without a terminating (ending) condition?

a)

Sequence Loop

b)

Unlimited Loop

c)

Infinite Loop

d)

Conditional Loop

30.

Which type of control structure includes a set of instructions that the computer follows one by one from top to bottom.

a)

Loop

b)

Selection

c)

Sequence

d)

Algorithm

31.

Which of the following is used to store data in the computer's memory that the computer can access and use when running a program?

a)

Data

b)

Variable

c)

File

d)

Operator

32.

The program that Mauricio is creating to track his allowance, must store and access variables in the form of dollars and cents. Which variable data type should he use to store numbers that contain a decimal?

a)

Floating point

b)

Boolean

c)

String

d)

Integer

33.

Chris must use a Boolean operator in his programming class assignment. Which operator is an example of a Boolean operator?

a)

++

b)

!=

c)

&&

d)

%

34.

You have written a segment of code that includes the instructions to make a character jump. Your program will need to use these instructions multiple times. To save yourself the trouble of writing the code over and over again, you decide to name this section of code JUMP and then call the section of code using only the name JUMP. What type of programming component is JUMP?

a)

A function

b)

A property

c)

A object

d)

An instance

35.

Which statement is true about objects?

a)

Objects created using the same class must contain the same properties and property values.

b)

Objects created using the same class may contain different properties; however, the properties must contain the same values.

c)

Objects created using the same class must contain the same properties; however, the properties may contain different values.

d)

Objects created using the same class can contain different properties and property values.

36.

Carrie is using object-oriented programming to code her latest video game. In the game, she has objects that are little monsters. Each is unique in their own way (size, color, etc.). To create each of these unique looking objects, she needs to change the:

a)

methods.

b)

arguments.

c)

properties.

d)

classes.

37.

Which operator is an example of a Boolean operator?

a)

%

b)

++

c)

!-

d)

ll

38.

Which variable data type is used to store a whole number that does not contain a decimal?

a)

Boolean

b)

Integer

c)

String

d)

Floating point

39.

Which type of statement is an example of a selection programming structure?

a)

while

b)

if/else

c)

for

d)

do while

40.

Which term is also used to describe the selection control structure?

a)

Loop

b)

Sequence

c)

Object

d)

Decision