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

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.

主站蜘蛛池模板: 石嘴山市| 荆门市| 张家口市| 苏尼特左旗| 循化| 芮城县| 吴旗县| 陈巴尔虎旗| 渝北区| 保山市| 新源县| 晋宁县| 平利县| 曲水县| 石棉县| 当涂县| 兴城市| 彩票| 阳朔县| 罗江县| 汽车| 聊城市| 眉山市| 华宁县| 广南县| 循化| 丹阳市| 通榆县| 巴东县| 赤水市| 仙居县| 五河县| 会同县| 伊川县| 高邮市| 民丰县| 芜湖市| 三穗县| 交口县| 乐平市| 逊克县|