Programming Concepts (AQA GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
13 cards from this deck
ShowHide
Practise the cards
13 cards from this deck
What is a variable?
What is a variable?
A named storage location that holds data that can change during program execution
What is a constant?
What is a constant?
A named storage location with a fixed value throughout the program
Variable naming rule: spaces
Variable naming rule: spaces
Not allowed - names must be one continuous word
Variable naming rule: starting with numbers
Variable naming rule: starting with numbers
Not allowed at start, but OK within name
What to avoid in variable names
What to avoid in variable names
Reserved keywords used by the programming language
Are variable names case-sensitive?
Are variable names case-sensitive?
Yes - 'score' and 'Score' are different variables
Assignment symbol in pseudocode
Assignment symbol in pseudocode
← (arrow pointing from value to variable)
Assignment symbol in Python/VB.Net/C#
Assignment symbol in Python/VB.Net/C#
= (equals sign)
What happens when a variable is reassigned?
What happens when a variable is reassigned?
Old value is replaced and lost forever
Python variable declaration requirement
Python variable declaration requirement
None - Python doesn't require declarations
VB.Net keyword to declare variables
VB.Net keyword to declare variables
Dim
C# variable declaration requirement
C# variable declaration requirement
Must declare with data type before use
Variables vs constants: key difference
Variables vs constants: key difference
Variables can change; constants stay fixed throughout program
