1: Variables and data types 变量和数据类型
Every proper programming language has variables. These variables are used throughout your code or program to hold certain information so you can use it whenever you’d like.
Such a variable also has a name. You can look at it as a box: the name is like a label which allows you to identify the different boxes (variables) you have, and the information/data the variables store can be considered the content of those boxes.
变量非常重要,变量在整个代码中的作用为——存储某些信息,或者说数据。
在编程的过程中,只要通过正确的方法,你就可以随时使用变量中存储的信息。
每一个变量都有一个名字,并且名字是唯一的,比如说某个变量的名字为abc,而另一个变量的名字为def,等等。
在不同的时间点,同一个变量存储的信息可能是不同的,比如说某时abc这个变量存储的信息是123,而另一个时间点abc可能存储的就是456了,等等。
Every proper programming language has variables. These variables are used throughout your code or program to hold certain information so you can use it whenever you’d like.
Such a variable also has a name. You can look at it as a box: the name is like a label which allows you to identify the different boxes (variables) you have, and the information/data the variables store can be considered the content of those boxes.
变量非常重要,变量在整个代码中的作用为——存储某些信息,或者说数据。
在编程的过程中,只要通过正确的方法,你就可以随时使用变量中存储的信息。
每一个变量都有一个名字,并且名字是唯一的,比如说某个变量的名字为abc,而另一个变量的名字为def,等等。
在不同的时间点,同一个变量存储的信息可能是不同的,比如说某时abc这个变量存储的信息是123,而另一个时间点abc可能存储的就是456了,等等。