NEW
Font size
Worksheetsalgorithms and programming
Total questions: 16
Worksheet time: 5mins
What are the three basic programming constructs?
Sequence, selection and iteration
Sequence, selection and looping
Sequence, iteration and looping
Sequence, execution and selection
Which of the following statements implement definite iteration?
STOP UNTIL
FOR ENDFOR
REPEAT UNTIL
WHILE ENDWHILE
What are the two possible results of testing a condition?
YES and NO
POSITIVE and NEGATIVE
TRUE and FALSE
0 or 1
What is the name given to the joining of strings?
Manipulation
Declaration
addition
Concatenation
Which logical operator represents greater than?
<
>
>=
==
Which of the following is a benefit of using local variables?
Other programmers cannot use them
They cannot accidentally be changed by other parts of a program
They make all variable names unique
They make selections work
What is an array?
A data structure that holds one or more items of data
A variable with more than one data type
A variable with more than one value
Sorting data in a list
Which data type represents whole numbers?
Real
String
Integer
Float
What is a constant?
A value that does not usually change as a program is running
A variable with more than one data type
A named piece of memory that holds a value which usually changes as a program is running
A named piece of memory that holds a value which cannot be changed as a program is running
What is a function?
A type of subroutine that calculates a value
A type of subroutine that returns a value
A type of subroutine that processes a value, but does not return it
A type of subroutine that only runs when called
What is recorded in a test/trace table?
Evidence of successful tests
Evidence of failed tests
Evidence of testing
Evidence the program run
What are two types of programming error?
Syntax errors and logic errors
Syntax errors and validation errors
Logic errors and validation errors
Error Erros
What is an algorithm?
How to make a jam sandwich
A way to solve a problem
instructions
Step by step instructions to solve a problem
Code repeated / looped until a condition has been met or a set number of times.
Iteration
While...
the end is never
the end is never
the end is never
the end is never
the end is never
the end is never
the end is never
the end is never
the end is never...
For...
people = ["jo", "maya", "jay"]
print (people[1])
what would this result be?
maya
jo
jay
error
What is the % used for in Python?
Integer division
Give the whole number
To give the remainder
Give the decimal only
