Right, so here's a little piece of code that's going to print out the smallest value of three.
好,那么这一小段代码,就是会显示出,三个值中最小的来。
I'm going to go over here, and let me define a couple of these things.
仅仅是用来显示值的,好,让我们看看如果,我运行这个程序会有什么结果。
Well, this block here on the left that I came counter counter=0 up with arbitrarily sets a variable called counter equal to 0 and then it forever says that counters value 1 and then it changes the counter by 1.
大家看一下左边的这一段代码,其中有一个随便定义的变量,它会一直显示counter的值,每显示一次,counter加。
Which is, and we're going to do some examples of this, initially we just typed in expressions Python into the interpreter; that is,directly into Python And as I suggested last time, the interpreter is actually a program inside of the machine that is basically following the rules we're describing here to deduce the value and print it up.
也就是,我们将会对这一点讲解一些例子,一开始我们只是简单的把表达式输入,到解释器里面去,也就是直接传给,我上次跟大家讲过,解释器实际上是,机器内置的,按照我们描述的规则,来推算出结果值并把值显示出来的一个东西。
That's the Python saying, that is a command, that is a specific command to get the value of the expression and print it back out.
这代表着Python告诉我们这是一个命令,这是一个,得到表达式的值,并显示的特殊命令。
So I can concatenate techs plus ivys and assign that result to univs, and then when I print it you'll notice I just get a list of five strings.
和ivys数组用加号串联运算,并把结果赋值给univs数组,接下来我显示下univs的结果,你注意到我得到了一个。
Now I'll print L 2. Kind of what you'd guess, but here's the interesting question: if I say L 1 is assigned 0, L 1 sub is assigned 4, I'll print L 1.
然后我将显示下L2的内容,你,们猜猜这个有趣的问题:,如果我将L1赋值为4的话,再去显示下L1,会怎么样呢?
应用推荐