wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Unit 1 Review

Total questions: 20

Worksheet time: 27mins

Name
Class
Date
1.

Which of the following best describe examples of abstraction

a)

A developer writing a program for calculating properties of shapes uses a variable pi to store a decimal approximation of the number π (~3.14159). They use this variable whenever they need to use the number π to calculate an area or volume.

b)

A series of steps for creating a model aeroplane is laid out in a clear order, with specific instructions in great detail for completing each step.

c)

Several developers are working on a program together. In order to complete the work efficiently, they split the program up into several parts, and each work on a section, testing as they proceed. When code is complete they add it to a master program.

2.

Rick is in charge of a team developing a program which will be used by businesses to control stock. The team has already consulted with potential clients and developed an idea of what inputs will be required and the likely outputs that will be produced from these inputs. Which of the following should Rick and his team do next?

Correct Answer

a)

Write segments of code in different languages to see which language will be most suitable for the job

b)

Plan the structure of the program and determine how the major algorithms will work

c)

Make a list of bugs which will occur during development and propose ways these could be fixed

d)

Decide on the schedule for updates and maintenance of the code

3.

Jama is creating a program which calculates the square roots of whole numbers. The program will store the results of each square-root as a variable. Which of the following data-types would be best used for this variable?

a)

int

b)

string

c)

bool

d)

float

4.

Which of the following describes algorithmic solutions to problems:


I. A set of step by step instructions for assembling a piece of furniture.


II. A flowchart used to make important decisions on which actions to take in an emergency situation


III. A recipe for baking a cake with detailed numbered steps to follow

a)

I, II and III

b)

I and III only

c)

I and II only

d)

II and III only

5.

Which of the following statements about variables in programming are true?


I. Variables allow a value to be stored for future use

II. Once the value of a variable is set it cannot be changed

III. The name given to a variable is important for human comprehension, but not for the computer.

a)

II only

b)

I and III only

c)

I only

d)

I, II and III

6.

Erin has written a program which presents a user with multiple-choice quiz questions to answer and calculates a percent score based on the number the user got right or wrong. Each question has 5 possible answers, and scores presented are from 0 to 100 percent inclusive. Which of the following could be represented by a boolean variable?

a)

The correct answer choice for a particular question.

b)

The percent score of the user

c)

Whether a user got a specific question right or not

d)

The number of questions in the quiz.

7.

Which of the following statements are NOT true about high level programming languages? Select one answer:

a)

Code written using high level languages is relatively easy for humans to read, write and parse

b)

Code written using high level languages usually requires compiling before it can be run

c)

Code written using high level languages is guaranteed to be ambiguous

8.

The following algorithm is presented for assembling a piece of furniture from 12 individually numbered parts.


Parts 1, 5, and 11

Parts 2 and 10

Part 12

Parts 6 to 9 inclusive

Parts 3 and 4


Which of the following correctly describe issues with the way these instructions are presented?


I. There instructions lack the required descriptive qualifiers

II. The instructions lack the required imperative statements

III. The order in which the instructions should be performed is unclear

a)

II only

b)

I and II

c)

I only

d)

I, II and III

9.

Which of the following variable types is characterized by allowing only two possible values to be stored?

a)

String

b)

Float

c)

Boolean

d)

Array

10.

Marta is writing a program for a home-automation system.


Three of the variables in her program are as follows:


light - A variable which determines whether the lights in a room are switched on or off


temp - A variable which records the temperature of the room to the nearest whole degree Fahrenheit


name - A variable which records the name the user has set for the room (e.g. “kitchen”)


Which of the following correctly describes the types which would be best used for each of these variables?

a)

light - boolean, temp - integer, name - string

b)

light - integer, temp - boolean, name - string

c)

light - string, temp - integer, name - boolean

d)

light - boolean, temp - string, name - integer

11.

Which of the following best describes how abstraction makes code written in higher-level programming languages easier for humans to parse?

a)

Abstractions used in higher-level languages make the code closer to the actual individual operations performed by the CPU

b)

Abstractions used in higher-level languages mean what a command does is easier to understand without needing to parse all the individual operations performed by the CPU.

c)

Abstractions used in higher-level languages make them almost identical to a natural language which would be spoken by humans.

d)

Abstractions used in higher-level languages remove any potential ambiguity from the code.

12.

Microsoft Excel® is a spreadsheet program that can be used for computing the average of a list of values in cells A1 through A20 with a command such as =AVERAGE(A1:A20). After the user initiates this command, the command disappears and the average (or mean) of the list of numbers appears. Why is this an abstraction?

a)

There is math being used in order to calculate the average.

b)

The average can be viewed without knowing the process of how the average was computed.

c)

There are steps that are followed in order to complete the calculations.

d)

There is an equal sign present in the command.

13.

The following algorithm is proposed for the task of baking a cake, and is presented along with a list of ingredients.


  • Add some ingredients from the list to a bowl
  • Stir
  • Add other ingredients to a bowl Stir
  • Put in a tin in the oven
  • Take out tin from oven


Which of the following correctly describes an issue with the way the instructions in this algorithm is presented?

a)

The instructions do not contain any selection or iteration statements

b)

The instructions lack descriptive qualifiers

c)

The sequencing of the instructions is unclear

d)

The instructions lack imperative statements

14.

Which of the following best describes why the development process by which computer programs are created is described as “iterative”?

a)

The process is a cycle, with results from one run of the cycle feeding into the next.

b)

The steps in the process must be strictly followed one after another.

c)

The process begins with planning and design phases before any of the implementation begins.

d)

Evaluation and testing may take place throughout the process and not just at the end.

15.

Which of the following best describes high-level computing languages?

a)

They are very easy for machines to understand and parse

b)

They evolve naturally over time

c)

They are not very ambiguous

d)

They are extremely difficult for humans to read and understand

16.

Which of the following could NOT be represented by a boolean variable?

a)

Whether a moving elevator is moving up or down

b)

Whether a traffic light is green, yellow or red

c)

Whether a store is open or closed

d)

Whether a light-bulb is on or off

17.

Which of the following terms is NOT a component of algorithms?

View options

a)

Completes a task

b)

none of the above

c)

Runs Infinitely

18.

Which of the following is NOT an advantage of giving variables meaningful names in a program?

a)

It is easier for a computer to understand the program, meaning compile-times and run-times are reduced

b)

It is easier for people who are unfamiliar with the code to read the program and understand what it may be doing

c)

When writing the program a programmer will be less likely to use variables for the wrong purpose

d)

When editing the program in the future, a programmer will be able to make changes with greater ease and refer to the documentation less

19.

In physics, Power = W/T. What do the W and T stand for?

a)

Watts over Temperature

b)

Watts over Time

c)

Work over Time

d)

Weight over Time

20.

Which of the following is NOT an example of onomatopoeia?

a)

Hmmmm

b)

Grrr

c)

Cool

d)

Hahaha