StudyBrixFree worksheets, study guides and courses

Computer science · lesson 1 of 4

Values, variables and expressions

A concrete piece of data such as a number or string.

University8 practice questionsNotes + worked examples

Learn the ideas

Prerequisites: Basic computer literacy.

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

Example 1

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

Example 2

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

8 questions

Decimals or fractions are accepted for numeric answers. Proofs and written responses use sample answers and require human marking. This is practice, not a protected examination.

1 Which term best matches this description: A concrete piece of data such as a number or string.

Show answer and explanation

Value

Value is the matching concept in this lesson.

2 Which term best matches this description: A name that refers to a value in a program.

Show answer and explanation

Variable

Variable is the matching concept in this lesson.

3 Which concept would you apply first in a situation where code that evaluates to a value.

Show answer and explanation

Expression

The scenario directly calls for Expression.

4 Name the concept described as: A category that determines operations and representation for a value.

Show answer and explanation

Type

The intended concept is Type.

5 Which statement about Value is most accurate?

Show answer and explanation

A concrete piece of data such as a number or string.

The definition in the lesson notes gives the required condition.

6 Explain one important difference between Value and Variable.

Sample answer and marking guidance

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.

7 Give a short example showing how Expression would be used in practice.

Sample answer and marking guidance

A valid example should demonstrate this idea: Code that evaluates to a value.

Credit a relevant scenario that applies the concept rather than merely naming it.

8 Summarize why Type matters in the lesson “Values, variables and expressions”.

Sample answer and marking guidance

Type matters because A category that determines operations and representation for a value.

Credit the core purpose, scope and any important limitation from the notes.

Further reading and review references

These are reference links, not copied exercises, institutional endorsement or proof of independent review.