What is variable?

Derived from the Latin term variabilis, variable is a word that represents that which varies or is subject to some kind of change. It is something that is characterized by being unstable, inconstant and changing.

In other words, a variable is a symbol that identifies an unspecified element within a given group. This set is generally defined as the universal set of the variable (universe of the variable, on other occasions), and each part included in it constitutes a value of the variable. Algorithms, statements, and formulas can include variables. Examples and uses Let’s look at an example. x is a variable in the universe { 1 , 3 , 5 , 7 }. Therefore, x can be equal to any of the values ​​mentioned above, so it is possible to replace x with any odd number less than 8 .

As you can see, variables are elements present in formulas, propositions and algorithms, which can be replaced or can acquire different values, without ceasing to belong to the same universe. It is worth mentioning that the values ​​of a variable can fall within a range or be limited by situations of relevance. Types of variables We can talk about different types of variables: dependent variables, which are those that depend on the value assigned to other phenomena or variables; independent variables, whose value changes influence the values ​​of the other; Random variables are the functions that assign a real number to each element of a set E. The value that the dice can add when rolling them is a random variable. In another classification, it can be said that there are qualitative variables, which express different qualities, characteristics or modalities, and quantitative variables, which are expressed through numerical quantities, among others. Within the qualitative variables, there are nominal variables (those that are not numerical and cannot be ordered either, such as marital status) and ordinal or quasi-quantitative variables (they are not numerical, but allow their ordering, such as exam grades). On the other hand, quantitative variables can be discrete (it does not allow intermediate values, but exact numbers, for example the number of siblings of a person) or continuous (those that accept intermediate values ​​between two numbers, for example weight or height measurements) .

See also  What is the golden wedding?

Use of the concept in computing In the field of programming (computing), variables are data structures that can change their content throughout the execution of a program. These structures correspond to a reserved area in the main memory of the computer. The programmer assigns a label to each variable that allows him to recognize it from the others, so whenever he needs to, he can call that variable and it will come up with the value that has been assigned to it. For example, if the variable is called “num” and it is stored with the number 7. If the programmer wants to use it, he can program: num = num + 1 and he will get a result that precedes this variable.

In programming, variables are ordered differently, there are boolean, floating point decimal, array, array, and random types, among others. Variables are the basis of programming, they respond to a language and allow the programmer to carry out work in an orderly and efficient manner. The sum of the variables are those that result in a certain action in a program and always respond to the wishes of the programmer. This means that it was from an engine or from the code of a certain program, and these variables could mean something else and, ultimately, it will turn out to be different, because each programmer can assign the values ​​they want to each one. of the variables in the code of it. Finally, it is worth mentioning that, in astronomy, variable stars are those that experience significant variations in their luminosity.

See also  What's on another continent?

Related Posts