Programming Concepts (AQA GCSE Computer Science): Flashcards

📚Flashcards
Variables, Constants and Assignments
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

13 cards from this deck

Show

What is a variable?

A named storage location that holds data that can change during program execution

What is a constant?

A named storage location with a fixed value throughout the program

Variable naming rule: spaces

Not allowed - names must be one continuous word

Variable naming rule: starting with numbers

Not allowed at start, but OK within name

What to avoid in variable names

Reserved keywords used by the programming language

Are variable names case-sensitive?

Yes - 'score' and 'Score' are different variables

Assignment symbol in pseudocode

← (arrow pointing from value to variable)

Assignment symbol in Python/VB.Net/C#

= (equals sign)

What happens when a variable is reassigned?

Old value is replaced and lost forever

Python variable declaration requirement

None - Python doesn't require declarations

VB.Net keyword to declare variables

Dim

C# variable declaration requirement

Must declare with data type before use

Variables vs constants: key difference

Variables can change; constants stay fixed throughout program

Join 100,000+ GCSE students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.