The use of variables, constants, inputs, outputs and assignments Flashcards
1
Q
What is a variable ?
A
- A value stored in memory that can change whilst the programmed is still running.
2
Q
What is a Constant?
A
- A value that does not change while the program is running and is assigned when the program is designed.
`
3
Q
What is an assignment?
A
- -+Giving a variable or constant an variable.
4
Q
What is casting?
A
- Converting a variable from one data type to another.
- A variable can be an integer, character, string, real, float, Boolean. `
5
Q
What is an input?
A
- a value read from an input device.
6
Q
What is an output?
A
- Data generated by the computer and displayed by the user,
7
Q
What are the advantages of a constant?
A
- Makes programs easier to read- usually assigned and declared at the top of the program.
- Easily be changed by the programmer in one place of the programme.
- don’t change it every instance of a value throughout a program.
- Less chance of errors.
- Complier can optimise code.
- Makes program run faster.