Mapa mental
Variables and constants
Contenido del mapa
Variables and constants
Identifiers
- Variables and constants have names or identifiers.
- Identifiers describe the data being stored.
- Short identifiers are easier to spell correctly each time they are used.
- Long identifiers can be used if they are more descriptive, e.g. firstName.
- Identifiers describe the data being stored.
- Variables and constants have names or identifiers.
Assignment
- Values are assigned in assignment statements using the = symbol.
- The variable value can be changed as the program is running
- Constants are assigned and used in calculations, they cannot be changed while the program is running.
- Values are assigned in assignment statements using the = symbol.
Naming conventions
- Variable and constant identifiers must be consistent throughout the program.
- Camel case uses lower and upper case characters. ( FirstName or PricePerKilo )
- In snake case the words are linked with an underscore. ( first_name or price_per_kilo )
Variables and constants are used to store values in algorithms and programs.
Información
- Descripción
- Year 11 Computer Science Mapa Mental sobre Variables and constants, creado por Holly Dooley el 14/03/2019.
- Creado por
- Holly Dooley
- Visitas
- 0
- Valoración