Literally, return the control from this function, and take the value of the next expression, and return that as the value of the whole computation.
正如字面意义上说的,从这个函数返回,然后取得下一个表达式的值,并把这个值作为整个计算的结果返回。
What I have now is the following: I can write expressions, do combinations of things to get out values, I can store them away, I can print them up.
我已经讲过如下内容:,如何写表达式,如果把东西混合然后得到结果值,我可以将其保存,也可以将其显示。
To some degree, it's harder to imagine the worst thing than to statistically sort of figure out the middle band.
一定程度上,预测最坏的结果,要比以统计的方式预测出中间值更为艰难。
What comes out of the math is that the value of k, there are multiple values, there are multiple solutions.
得到的数学结果是k的值,这有多种值,多种解法。
I'm going to try and predict what the value is going to be. And then see if, indeed, I get what I predicted.
我会去预测结果值应该是怎么样的,并去看看它是不是,跟我预期的相同。
We could also feel pretty comfortable that that's probably way too high a bias, right?
另外因为这个偏差值很高,所以结果才这么高?
It says, well I'm going to print out first and last just so you can see it, and then I say, gee 2 if last minus first is less than 2, that is, if there's no more than two elements left in the list, then I can just check those two elements and return the answer.
然后它计算了尾点和开始点的差,如果小于2的话,也就是说数组中的元素小于等于,我对这两个元素进行比较,然后返回结果就可以了,否则的话,我们就去寻找中值点,注意它是怎么实现的,首先这个指向一个列表的开头。
What I mean by that is, pick a simple set of values, and let's walk through it to see what happens. And this is useful because it's going to allow me to A make sure that I've got something that's going to terminate, it's going to let me make sure that in fact I'm doing the right kinds of updates.
原因你们知道的,好,模拟代码,我的意思就是,选出一系列的值来,然后模拟下代码的执行来看看结果,这很有用因为这让我确保我的程序在某个地方,可以终止,还会让我确保实际上我。
And of course I get out the value I'd like there.
当然我会从这里得到我想要的结果值。
There are two possible values here, I think.
有两个可能的结果值了,我认为。
All right? And if you want to do other things, whoops, sorry-- and add them together, we will get out, again, a concatenation of that string. And these will, we'll let you work through the variations, but these are the simple expressions we can use.
对不对?如果你想要进行一些别的操作,哦,对不起-是加到一块,然后结果值也是,两个字符串的链接,这些会,我们会让大家慢慢学习变量,但是这些是我们能用的最简单的表达式。
It's going to be stored away in a variable.
结果值会被储存在变量里。
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的结果,你注意到我得到了一个。
If they tend to move together, when x is high and y is high together at the same time, then the covariance will tend to be a positive number.
如果x和y同向变动,当x值和y值同时都很大,协方差的结果将会是一个正值
In there, I want to make this distinction, this nuance: the evaluator is still going to be taking those expressions and using its rules to get a value, but it's not going to print them back out.
在这里,我想要做这么一个,细微差别:运算器依然会,对表达式,进行求值,但是不会,显示结果值。
There's nothing profound about this, other than the understanding that the details of how you set these things up can matter a lot.
只是说我们要理解,一开始设定时候的值,会对结果有很大影响。
The interpreter is going to get a value for it.
处理器会对表达式运算得到一个结果值。
All right. Second question: or maybe a better way of saying this, and the general format you're likely to see here is, a test involving a variable name, which must be initialized outside of the loop, and which interior to the loop gets changed, so that the test is going to change.
好,第二个问题:,换种更好的方式来说吧,你们通常喜欢的,方式是,这个测试涉及到一个变量名字,变量在循环外已经被初始化,然后循环内部会改变这个变量的值,因此测试结果会改变。
Initially, it's the beginning and the end of it.
然后根据中值点和目标数的比较结果。
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.
也就是,我们将会对这一点讲解一些例子,一开始我们只是简单的把表达式输入,到解释器里面去,也就是直接传给,我上次跟大家讲过,解释器实际上是,机器内置的,按照我们描述的规则,来推算出结果值并把值显示出来的一个东西。
In either case, I take that value and multiply back by two, if it was even I get back the original number, if it was odd, I'm not going to get back the original number, so I can just check to see if they're the same.
在两种情况中,我都把结果值,再乘以2,如果x是偶数我就,得到了原来的值,如果x是奇数那么就不会得到,原来的值,因此我看看得到的值,和原来的值相等不相等就可以了。
I'm expecting the value that test to be a Boolean. Followed by a colon.
我希望测试的结果值的类型,是Boolean的,后面是个冒号。
应用推荐