Variables and constants (Edexcel GCSE Computer Science): Flashcards

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

Practise the cards

12 cards from this deck

Show

What is a variable?

A container that holds values that can change during a program

What is a constant?

A container with a value that cannot change once set

What are identifiers?

Names given to variables and constants

What is best practice for naming identifiers?

Use meaningful, descriptive names; avoid short unclear names

Can identifiers be reserved words?

No, identifiers cannot be the same as reserved words

Variable naming convention

camelCase (lowercase start, capitalise new words)

Constant naming convention

ALL UPPER CASE letters

What is assignment?

Process of storing a value in a variable or constant

Assignment symbol in program code

Equals symbol (=)

Assignment notation in flowcharts

SET...TO (e.g., SET score TO 85)

Command to get user input

GET or input()

Command to display variable values

OUTPUT or print()

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

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