What Do Constants and Variables Mean in Computers?

Variable – Data Relationship

Computers use data called constants and variables throughout the process to solve problems . Data defined as “ constant ” are values ​​that never change during the solution process of the problem.

Constant values ​​can be numeric, characters or special symbols. During the course of the program, this value is called with the name given to it and its value cannot be changed.

The value is stored in the computer’s memory and a name is assigned.

Variable – Data Relationship

Conversely, when a “variable” is defined, its value can change as long as the program runs (Figure 1.8). Variables are given names that express the values ​​they carry, in this way their defining features are formed.

Programmers should give a separate name to each variable needed in the solution process. So the computer uses this name to find the corresponding value in memory. The variable can be of different data types, but its name must be consistent with the value it contains.

For example, a variable named price may have a value of 50 assigned to it, this value may change as the program runs, but the name of the variable never changes.

Here are the rules to consider when naming and using variables:

  1. Give the variable names consistent with the value it contains.
  2. Do not use spaces when naming variables.
  3. When naming variables, start with a character.
  4. Be careful not to use mathematical symbols.

 The variable name use as “True” and “False”:

False True

1 number number1

School Number. school Number

Question? question

The following points about variable names: 

  • For the Turkish characters is not recommended because some platforms do not support it.
  • Command names used in programming languages ​​cannot be used as variables. The well-known ones; if, for, while, else, do, int, etc.


  • In variable naming, a underscore ( _ ) character can be used instead of a space character, but in variable naming, it usually starts with a lowercase letter and if a second word is to be written, it is followed by a capital letter immediately after the first word. This is called the use of “Camel Character”.

Also Read: 15 Standing Yoga Poses for Balance and Stability

Leave a Comment