NEW
Font size
WorksheetsUnit 1 Review
Total questions: 20
Worksheet time: 27mins
Which of the following best describe examples of abstraction
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.
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.
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.
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
Write segments of code in different languages to see which language will be most suitable for the job
Plan the structure of the program and determine how the major algorithms will work
Make a list of bugs which will occur during development and propose ways these could be fixed
Decide on the schedule for updates and maintenance of the code
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?
int
string
bool
float
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
I, II and III
I and III only
I and II only
II and III only
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.
II only
I and III only
I only
I, II and III
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?
The correct answer choice for a particular question.
The percent score of the user
Whether a user got a specific question right or not
The number of questions in the quiz.
Which of the following statements are NOT true about high level programming languages? Select one answer:
Code written using high level languages is relatively easy for humans to read, write and parse
Code written using high level languages usually requires compiling before it can be run
Code written using high level languages is guaranteed to be ambiguous
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
II only
I and II
I only
I, II and III
Which of the following variable types is characterized by allowing only two possible values to be stored?
String
Float
Boolean
Array
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?
light - boolean, temp - integer, name - string
light - integer, temp - boolean, name - string
light - string, temp - integer, name - boolean
light - boolean, temp - string, name - integer
Which of the following best describes how abstraction makes code written in higher-level programming languages easier for humans to parse?
Abstractions used in higher-level languages make the code closer to the actual individual operations performed by the CPU
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.
Abstractions used in higher-level languages make them almost identical to a natural language which would be spoken by humans.
Abstractions used in higher-level languages remove any potential ambiguity from the code.
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?
There is math being used in order to calculate the average.
The average can be viewed without knowing the process of how the average was computed.
There are steps that are followed in order to complete the calculations.
There is an equal sign present in the command.
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?
The instructions do not contain any selection or iteration statements
The instructions lack descriptive qualifiers
The sequencing of the instructions is unclear
The instructions lack imperative statements
Which of the following best describes why the development process by which computer programs are created is described as “iterative”?
The process is a cycle, with results from one run of the cycle feeding into the next.
The steps in the process must be strictly followed one after another.
The process begins with planning and design phases before any of the implementation begins.
Evaluation and testing may take place throughout the process and not just at the end.
Which of the following best describes high-level computing languages?
They are very easy for machines to understand and parse
They evolve naturally over time
They are not very ambiguous
They are extremely difficult for humans to read and understand
Which of the following could NOT be represented by a boolean variable?
Whether a moving elevator is moving up or down
Whether a traffic light is green, yellow or red
Whether a store is open or closed
Whether a light-bulb is on or off
Which of the following terms is NOT a component of algorithms?
View options
Completes a task
none of the above
Runs Infinitely
Which of the following is NOT an advantage of giving variables meaningful names in a program?
It is easier for a computer to understand the program, meaning compile-times and run-times are reduced
It is easier for people who are unfamiliar with the code to read the program and understand what it may be doing
When writing the program a programmer will be less likely to use variables for the wrong purpose
When editing the program in the future, a programmer will be able to make changes with greater ease and refer to the documentation less
In physics, Power = W/T. What do the W and T stand for?
Watts over Temperature
Watts over Time
Work over Time
Weight over Time
Which of the following is NOT an example of onomatopoeia?
Hmmmm
Grrr
Cool
Hahaha
