0 of 10 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 10 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
On the left-hand side is a set of terms. On the right-hand side is a set of statements or definitions.
String
|
|
Integer
|
|
Real
|
|
Float
|
|
Double
|
|
Instructions
Below are a number of statements. Tick the answers that are correct only
Explain why the programmer must give the variable a name?
Explain why the programmer must give the variable a name?
Numerical data can be stored as an integer, real or string data type. State the difference between these three data types?
This response will be awarded full points automatically, but it can be reviewed and adjusted after submission.
Use the words in the table below to fill-in-the-gaps in the text. Each word may only be used once.
MEMORY | CONSTANT | ARGUMENT | DATA |
SPACES | SOURCE | OPERATING | COMPARE |
BOOLEAN | NAME | OR | UNDERSCORE |
RUNS | OPERATORS | CHANGED | ARITHMETIC |
One of the tasks of a computer program is to be able to keep track of changing .  This job is performed through the use of variables.  Programmers give variables a sensible so that they can be easily identified.  The name is then used by the program to find the  location where the variable’s data is being stored.  The data stored in that variable can then be read, modified and used within the program.  By naming variables you do not need to know, or care, where in memory that variable is being stored, the system will take care of it.  When using variables there are certain naming conventions. should never be used, instead, if multiple words are required then either capital letters at the start of each word, or an between words, should be used.
Variables enable their contents to be whilst the program is being run. Â However, some values do not ever need to be changed and so for these, a is used. Â A constant has a label or name to identify it and its value cannot be changed as the program . Â Not being able to change the value can be advantageous as it means that the data held within the constant cannot be accidentally altered. Â Another advantage is that if the value does ever need to be changed then it only has to be altered in one place. Â However, this does have to be done via the code.
Computer programs are able to carry out calculations and  data.  This is possible through the use of .  There are several types of operator, , boolean, assignment and compound operators.  An operator always acts on at least one item.  This item is called the ‘ ’ of the operator. operators carry out a logical operation on their arguments.  For example, AND returns TRUE only if both arguments are true.  Whereas, will return TRUE if either argument is true.  NOT will return the inverse of the boolean argument.  Assignment operators assign values to variables
MEMORY | CONSTANT | ARGUMENT | DATA |
SPACES | SOURCE | OPERATING | COMPARE |
BOOLEAN | NAME | OR | UNDERSCORE |
RUNS | OPERATORS | CHANGED | ARITHMETIC |
Test
On the left-hand side is a set of terms. On the right-hand side is a set of statements or definitions.
Variable
|
|
Constant
|
|
Operator
|
|
Arithmetic Operator
|
|
Boolean
|
|
Assignment
|
|
Input
|
|
Processes
|
|
Output
|
|
test
Variables are stored in main memory
Variables store data values
You can change the value of constants while the program runs
X
Using constants helps improve code legibility
X
Using constants causes a program to run slower
X
String is a type of operator
X
Booleans are a type of operator
X
Modulus returns the remainder of a division
X
= is an arithmetic operator
X
= is a Boolean operator X
= is an assignment operator X
TRUE is a Boolean operator
X
NOT is a Boolean operator X
Output commands ask the user to enter data
X
21 % 3 == 7 X
Boolean operators always return either TRUE or FALSE
X
What is a variable?