Computer science · University
Values, variables and expressions
A concrete piece of data such as a number or string.
Prerequisites
Basic computer literacy.
Study notes
Value
A concrete piece of data such as a number or string.
Variable
A name that refers to a value in a program.
Expression
Code that evaluates to a value.
Type
A category that determines operations and representation for a value.
Worked examples
Which term best matches this description: A concrete piece of data such as a number or string.
Value is the matching concept in this lesson.
Value
Which term best matches this description: A name that refers to a value in a program.
Variable is the matching concept in this lesson.
Variable
Check your understanding
Which concept would you apply first in a situation where code that evaluates to a value.
- Expression
- Variable
- Value
- Type
Name the concept described as: A category that determines operations and representation for a value.
Which statement about Value is most accurate?
- Code that evaluates to a value.
- A concrete piece of data such as a number or string.
- A name that refers to a value in a program.
- A category that determines operations and representation for a value.
Explain one important difference between Value and Variable.
Answers and marking guidance
Answers and marking notes
- Expression
The scenario directly calls for Expression.
- Type
The intended concept is Type.
- A concrete piece of data such as a number or string.
The definition in the lesson notes gives the required condition.
- Value: A concrete piece of data such as a number or string. Variable: A name that refers to a value in a program.
Credit a clear distinction using both definitions and an appropriate example if supplied.
Further reading and review references
These are reference links, not copied exercises, institutional endorsement or proof of independent review.
AI-assisted preview; independent educational review required. Level labels describe prerequisites, not accreditation or official curriculum alignment.