Font size
WorksheetsAssessment 3
Total questions: 75
Worksheet time: 46mins
What are syntax errors? choose two
When the program doesn't do what you want
When programs do not meet the rules or grammar of the language
When you make a spelling mistake
Errors preventing the code running
Iterative testing is.....
Testing code which iterated through input
Testing is input
Testing parts of the code during programming
Testing when the program is complete
What are logic errors?
An error that does not stop the code from executing
When the logic gates are incorrectly connected
An error where the logic doesn't make sense
Code that does not give the desired output
Syntax error, logic error or is this code OK?
Syntax error
Logic error
It is great programming, well done Mr Taylor
Syntax error, Logic error or this code is perfect?
Another great program, it is all ok
Syntax error
Logic error
Iterative testing is.....
Testing code which iterated through input
Testing is input
Testing parts of the code during programming
Testing when the program is complete
Terminal testing is.....
when you test code from a networked terminal
when a terminal error causes the code to crash
when to carry out final testing when the code is complete
when you code is so bad to need to delete it and start again
It is important to test code with a range of data. Which of the following is a recognised type of test data? choose four
Valid
Extreme/boundary
Null/non-existent
Critical
Invalid
George, Jane, Miranda, Ahmed, Sophie, Bernie, Keith.
They are sorted using Insertion sort. What is the first name to be moved?
A programmer uses comments in their code to ...
Explain the purpose of their code
Make it look pretty
Make the program run quicker
Stop the program from getting bugs
Indentation is used to make the code difficult to read
TRUE
FALSE
Indentation is mainly used ...
In IF statements / Loops / Procedures
In print statements
In a input statement
In a comment only
A programmer is deciding what to name a variable that stores someones full name. Which is the most suitable variable name to use
x = input ( "Enter full name" )
jeff = input ( "Enter full name" )
full_name = input ( "Enter full name" )
full name = input ( "Enter full name" )
Code that is well maintained with comments / indentations / procedures and extra whitespace means that the program is more ...
Robust
Complicated
Quicker
What can we use when coding to improve its maintainability (easier to read and understand)?
Comments
Blocks of code
Indentation
Clear and understanding variable names
ALL of the options
What does 'maintainability' mean in the context of coding? (2 answers)
Ensuring it is clear and understanding so that it can be re-used
A type of software testing where individual units/ components of a software are tested
is the practice of anticipating every possible way that an end-user could misuse a system or device
Ensuring it is clear and understanding so that errors in the code can be identified quickly
Why do computers use algorithms?
To give computers precise steps to solve a problem.
Because they are easy to use
It is the language that computers understand
To help them predict the future
Yes
19
A diagram that represents a set of instructions is called:
Flow Chart
Pseudocode
Shapes
>
<
What will happen if the user's book return is late?
Sends them an SMS (text)
Does not send them an SMS (text)
A variable is a named value that can be changed in the program.
False
True
What is a String?
A data type that contains whole numbers. eg: 3, 45, 124
Numbers with decimal point. eg: 0.5, 2.45, 56.04
Group of characters between quotation marks. eg: "dog"
Data type that can only be True or False.
Which value is a String?
64
"cat"
True
0.5
What is an Integer?
A data type that contains whole numbers. eg: 3, 45, 124
Numbers with decimal point. eg: 0.5, 2.45, 56.04
Group of characters between quotation marks. eg: "dog"
Data type that can only be True or False.
Which value is an Integer?
64
"cat"
True
0.5
What is a Float?
A data type that contains whole numbers. eg: 3, 45, 124
Numbers with decimal point. eg: 0.5, 2.45, 56.04
Group of characters between quotation marks. eg: "dog"
Data type that can only be True or False.
Which value is a Float?
64
"cat"
True
0.5
What is a Boolean?
A data type that contains whole numbers. eg: 3, 45, 124
Numbers with decimal point. eg: 0.5, 2.45, 56.04
Group of characters between quotation marks. eg: "dog"
Data type that can only be True or False.
Which value is a Boolean?
64
"cat"
True
0.5
_____ data type contain integer values with no decimal such as 1, 200, 999 etc.
int
float
char
String
_____ data type contain integer values with decimal such as 10.1, 5555.0, 33.33 etc.
int
float
char
String
_____ data type contain a character (text) such as A, a, Z, z etc.
int
float
char
String
_____ data type contain a set of characters (text) or word such as Hello, Ali, Car Type etc.
int
float
char
String
_____ data type represent one of two values either True or False such as 1, 0, 2 > 1, 3 < 2.
int
float
char
Boolean
Which if the values below is a float data type?
2
2.11
2/4
"2.11"
Which if the values below is an integer data type?
1
1.0
1/2
"1"
Which if the values below is a char data type?
firstValue
F
1.0
10 > 3
Which if the values below is a string data type?
firstValue
F
1.0
10 > 3
A variable is a named value that can be changed in the program.
False
True
