Variables/Constants Flashcards
How many kinds of variables are there?
6 kinds
What kinds of variables are there?
Integer, Float, Char, String, Boolean, Null
What is a variable?
A “container” for a certain value
What is the difference between variables and Constants?
Constants cannot change during the program, variables can
What is an identifier?
The unique string of characters used by the programmer to identify and call on the value
How do you pick the identifier for a variable or constant?
Based on what it is storing to allow for easy location.
ex. Storing the total score from a match as “scoreT”
Do all programming languages have Constants?
No. Python is an example of a programming language without Constants
How are Constants normally written?
In all caps
ex. SPEED
Can variables be set to other variables?
Yes, a variable can be set to other variables or operations of other variables.
What does a dynamically typed language do for variables?
You do not have to specify how the variable is stored.