Font size
WorksheetsMaintainability
Total questions: 78
Worksheet time: 45mins
A program is written that will accept an input and then print out the next four hexadecimal numbers in this list:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
If it gets to the end of the list, it goes back to the start.
If the user types in the number 8, what will be the next 4 numbers
9,10,11,12
9,A,B,C,D
A,B,C,D,E,F
9,A,B,C
A program is written that will accept an input and then print out the next four hexadecimal numbers in this list:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
If it gets to the end of the list, it goes back to the start.
The program is tested using the number 4 as an input. What is the reason for this test.
To test if the program prints out the next 4 numbers
To check to see if the program loops back to the beginning of the list
To check to see if the input is valid
Tests to see if it works ok
A program is written that will accept an input and then print out the next four hexadecimal numbers in this list:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
If it gets to the end of the list, it goes back to the start.
The program is tested using the number D as an input. What is the reason for this test.
To test if the program prints out the next 4 numbers
To check to see if the program loops back to the beginning of the list
To check to see if the input is valid
Tests to see if it works ok
A program is written that will accept an input and then print out the next four hexadecimal numbers in this list:
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
If it gets to the end of the list, it goes back to the start.
The program is tested using the number Z as an input. What is the reason for this test.
To test if the program prints out the next 4 numbers
To check to see if the program loops back to the beginning of the list
To check to see if the input is valid
Tests to see if it works ok
What term is used to describe data passed into/out of a program?
Variable
Loop
Constant
Parameter
What will be the output of this program if the user enters "Han" and then "Solo"?
An error
Nothing
first surname
Han Solo
What is the difference between a function and a procedure?
A function returns a value, a procedure does not.
A function accepts parameters, a procedure does not
A procedure returns a value, a function does not.
A procedure accepts parameters, a function does not
Select ALL the advantages of using SUBROUTINES when writing a program.
Problems can be broken down into smaller parts (Decomposition)
Subroutines can be tested independently
The same subroutines can be used in different programs
The subroutines can be used multiple times within a program
Makes the code longer
Select ALL the advantages of using SUBROUTINES when writing a program.
Makes the code shorter
Easier to maintain the code
Easier to debug
Work can be split easily between members of the team
Adds complexity
What type of error would result from you attempting to find the area of a circle, but you end up using the wrong equation.
Logic Error
Semantics Error
Syntax Error
Which of the following is a syntax error?
Attempting to divide by 0
Forgetting a colon at the end of a statement where one is required.
Forgetting to divide by 100 when printing a percentage amount.
Examples of this type of error would be missing a comma or a quotation mark, or misspelling a word.
Logic Error
Semantics Error
Syntax Error
Is this a logical or syntax error?
Logical error
Syntax error
Is this a logical or syntax error?
Logical error
Syntax error
Is this a logical or syntax error?
Logical error
Syntax error
Is this a logical or syntax error?
Logical error
Syntax error
Is this a logical or syntax error?
Logical error
Syntax error
Is this a logical or syntax error?
Logical error
Syntax error
Is this a logical or syntax error?
Logical error
Syntax error
Is this a logical or syntax error?
Logical error
Syntax error
Is this a logical or syntax error?
Logical error
Syntax error
Is this a logical or syntax error?
Logical error
Syntax error
Is this a logical or syntax error?
Logical error
Syntax error
Is this a logical or syntax error?
Logical error
Syntax error
What does this sentences describe "testing which is done while program is being written"
playing
iterative testing
final/terminal testing
professional testing
Is this a logical or syntax error?
Logical error
Syntax error
subtraction
Less than or equal to
What is meant by a syntax error?
An error in the grammar of the program.
A spelling error
List index out of range
Index error
Which of these is not a method for ensuring a program is robust?
Keeping passwords safe
Data Validation
Authentication
Data Sanitisation
What is data validation?
Checking that the data entered is wrong
Checking that the data entered is correct
Checking that the data entered is sensible or reasonable
What does a range check do?
Checks data across a range of numbers
Checks the data is within an acceptable range
Where three types of data are used
Checks that the data is in the correct format
Defensive design of programs includes input sanitization. What does input sanitization mean?
Cleaning up input data and removing unwanted data.
Checking if the input data is valid (follows given criteria)
Checking if the data has been entered correctly e.g. double entry
Checking only authorized users can gain access to the system
Creating maintainable code by adding comments and explanations
Defensive design of programs includes Validation. What does input sanitization mean?
Cleaning up input data and removing unwanted data.
Checking if the input data is valid (follows given criteria)
Checking if the data has been entered correctly e.g. double entry
Checking only authorized users can gain access to the system
Creating maintainable code by adding comments and explanations
Defensive design of programs includes Authentication. What does Authentication mean?
Cleaning up input data and removing unwanted data.
Checking if the input data is valid (follows given criteria)
Checking if the data has been entered correctly e.g. double entry
Checking only authorized users can gain access to the system
Creating maintainable code by adding comments and explanations
Defensive design of programs includes Maintainability. What does Maintainability mean?
Cleaning up input data and removing unwanted data.
Checking if the input data is valid (follows given criteria)
Checking if the data has been entered correctly e.g. double entry
Checking only authorized users can gain access to the system
Creating maintainable code by adding comments and explanations
Define ABSTRACTION
Breaking a task into smaller tasks.
Drawing a map to show how to reach a destination.
Creating step by step instructions.
Focusing on what is important and ignoring what is unnecessary.
Abstraction is:
adding to a problem
filtering out all irrelevant characteristics and unnecessary details
finding characteristics
looking for similarities
Click all that applies. Abstraction:
is a problem solving tool
removes unimportant information
adds important information
simplifies a situation
focuses on what is important
What is decomposition?
Adding detail to make a problem more complex
Breaking down a complex problem or system into smaller, more manageable parts
When you ignore the unnecessary detail in a problem
What is Abstraction?
The use of computers to solve problems
Breaking down a large problem into smaller sub-problems
Representing 'real world' problems in a computer using variables and symbols and removing unnecessary elements from the problem
Identifying the steps involved in solving a problem
