官术网_书友最值得收藏!

Variables

These are predefined, human-readable, and understandable words or letters that are used to store some values. At the very basis of writing a program we need a variable in which we will store the data or information, and based upon the variables, we can further enhance the programming logic. As we can see in the first line, an important part of creating a variable is that it should be human-readable and understandable.

Let us take an example: Suppose I want to store a number 2 in a variable. We can choose any name for a variable and define it:

Option 1: x=2
Option 2: number=2

The correct answer will be Option 2, as we know by the variable name (number) that this variable contains a specific number. As we can see in the preceding example, if we keep on using random ways of defining variables as we would when creating a big program, the complexity would be increased substantially because of the unclear meanings of the variables.

Different programming languages have different ways to define a variable, but the underlying concept of ensuring a variable is human-readable should be the top-most priority of the programmer or program author.

主站蜘蛛池模板: 大化| 离岛区| 屯门区| 凤庆县| 文水县| 罗田县| 孟津县| 河津市| 怀集县| 林州市| 哈尔滨市| 宁波市| 丰宁| 六安市| 红河县| 简阳市| 泽普县| 分宜县| 曲水县| 什邡市| 廊坊市| 略阳县| 侯马市| 陆川县| 微山县| 沾益县| 博罗县| 洛隆县| 尖扎县| 铜川市| 天峨县| 定西市| 绿春县| 响水县| 宝山区| 井研县| 娄烦县| 祥云县| 武强县| 余江县| 金堂县|