Fundamental Programming Concepts Flashcards
Card 1 of 5
All 5 cards in this deck
What is a variable in programming?
A named memory location whose value can change while the program is running.
What is a constant in programming?
A named value that is set once and cannot change while the program is running.
Give one reason to use a constant instead of a variable in a program.
The value cannot be changed accidentally, and it only needs editing in one place.
What is an assignment statement?
e.g. in OCR Exam Reference Language
A statement that stores a value in a variable using .
e.g.score = 0True or false?
==can be used to assign a value to a variable.False.
==tests for equality; a single=is used for assignment.