NEW
Font size
Worksheets2.3 and 2.5 End of topic assessment prep
Total questions: 80
Worksheet time: 43mins
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
A programmer can use comments to visually divide up sections of the code.
TRUE
FALSE
A programmer can use extra whitespace to help ...
Make the code more readable
Make the code less readable
Make the code run quicker
Make the code have fewer 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" )
A programmer is deciding what to name a list that stores players names. Which is the most suitable list name to use
z = [ " Stewie " , " Peter " , " Meg " ]
a_list = [ " Stewie " , " Peter " , " Meg " ]
a_list_of_names_from_a_tv_program = [ " Stewie " , " Peter " , " Meg " ]
names = [ " Stewie " , " Peter " , " Meg " ]
Procedures are used to ...
reduce duplicated code and make the code more structured
prevent bugs
make the program run slower
allows the program to perform more complicated functions
Code that is well maintained with comments / indentations / procedures and extra whitespace means that the program is more ...
Robust
Complicated
Quicker
Tidying an input before the program processes it, is known as ...
Input Sanitisation
Input Validation
An example of Input Sanitisation is ...
Removing any whitespace after some inputted data
Performing a length check
Correcting the spelling of any input
Performing a data type check
An example of Input Sanitisation is ...
Changing all of the inputted data to UPPER CASE or lower case
Performing a length check
Correcting the spelling of any input
Performing a data type check
name = input ( " Enter your name " )
name = name.lower( )
The above code will change the data in the variable to ...
Upper case
Lower case
Checking that the data meets the specific rules before the program processes it, is known as ...
Input Sanitisation
Input Validation
What validation check is being described?
The input is within the correct range
TYPE CHECK
RANGE CHECK
PRESENCE CHECK
LENGTH CHECK
What validation check is being described?
The input is entered with some data
TYPE CHECK
RANGE CHECK
PRESENCE CHECK
LENGTH CHECK
What validation check is being described?
The input has the correct number of characters entered
TYPE CHECK
RANGE CHECK
PRESENCE CHECK
LENGTH CHECK
What validation check is being described?
The input is of the correct data type
TYPE CHECK
RANGE CHECK
PRESENCE CHECK
FORMAT CHECK
What type of validation check is likely to be used with the following error message?
"You must enter a number between 1 and 10"
RANGE CHECK
PRESENCE CHECK
FORMAT CHECK
LENGTH CHECK
What type of validation check is likely to be used with the following error message?
"You must enter a password that has more than 8 characters"
RANGE CHECK
PRESENCE CHECK
FORMAT CHECK
LENGTH CHECK
What type of validation check is likely to be used with the following error message?
"You must enter a name"
RANGE CHECK
PRESENCE CHECK
FORMAT CHECK
LENGTH CHECK
What type of validation check is likely to be used with the following error message?
"You cannot use any numbers"
DATA TYPE CHECK
PRESENCE CHECK
FORMAT CHECK
LENGTH CHECK
Using Input Sanitisation and Input Validation makes the program more ...
Robust
Safe
Easier
Quicker
What will happen if a program attempts to divide a number by zero?
Crash
Nothing
Display the correct answer
If an online streaming program (e.g. Netflix) lost its connection with the online server, should the program ...
Crash
Let the user know that the connection has been lost, then refresh the connection
Let the user know that the connection has been lost, then do nothing
A receipt printer has a paper jam at a supermarket till. Should the software allow the user to reprint the receipt after it has been fixed?
Yes
No
A program has been created that uses an external text file. What errors should the programmer be aware of that could crash the program?
The text file could be corrupt or missing
The text file could have more than 1 thousand lines of data
The text file could be empty
The text file could have the wrong type of data
A program that asks the user to enter their username and password is known as ...
Validation
Sanitisation
Authentication
Why do we use eCaptcha techniques when creating new online accounts
To input the data quicker
To stop online bots creating accounts automatically
To stop people entering data with spelling mistakes
eCaptcha is used to verify that the user is ...
A human
An online bot
Which line contains a syntax error?
print("Hello")
sprint("Hello")
print("hello")
print("HELLO")
Look at the program below and classify the error
print (“Hello”)name = input (“What is your name?”)
Logic error
Data error
Text error
Syntax error
What problems can occur when coding a program?
Bugs in code
Wrong user name / password details
Poorly designed GUI
Changes in program syntax
What is a null value test on data entry?
Data that does not have a value such as a name or phone number
Data that is not entered in order to test how the program responds
Data that has a value of zero
Data that is incorrect
Which data below is a valid test for an age field?
18.6
99
Twenty-five
17 years 5 months
Translates low level assembly language mnemonic into machine code
Assembler
Compiler
Interpreter
Translates source code from high level languages into object code and then into machine code
Assembler
Compiler
Interpreter
Translates source code from high level languages into machine code
Assembler
Compiler
Interpreter
Program is translated line by line as the program is running
Assembler
Compiler
Interpreter
The whole program is translated into machine code before it is run
Assembler
Compiler
Interpreter
This is an example of ...
Machine Code
Low level programming language
High level programming language
This is an example of ...
Machine Code
Low level programming language
High level programming language
This is an example of ...
Machine Code
Low level programming language
High level programming language
Low level programming languages are easy to learn
TRUE
FALSE
High level programming languages have been designed to make it easier to create programs
TRUE
FALSE
The CPU can process a high level language directly
TRUE
FALSE
Programs must be translated to machine code in order for the CPU to process it
TRUE
FALSE
What is the only thing that computers understand?
Machine Code
Low Level Languages
High Level Languages
Algorithms
What does IDE stand for?
Intelligent Development Environment
Integrated Design Environment
Intelligent Development Environment
Integrated Development Environment
Here are two lines from an assembly language program. What is the correct term to describe the contents of the area with the red border?
Operands
Mnemonics
Memory locations
Machine Code
