And then hash character takes in any string or character, single character, gives me back a number. Notice what I do.
然后哈希接受任何字符串或字母,单个字符,返回给我一个数字,注意我要做什么。
It is going to give me back a tuple a collection of two things, and so check out the syntax.
它将给我返回一个数组或者系列的一对值,然后检查一下语法。
He wanted to go all the way to the Ganges River, but his army forced him to turn back.
他还想继续向恒河进军,但是他的军队迫使他返回波斯。
Well, I'm going to get back, let's just draw a bigger square than usual that's roughly four times the size.
嗯,返回的是,我画一个更大的方形,大致上是4倍的大小。
The Republic belongs to that period of Plato's work after his return to Athens, after the execution of Socrates.
理想国》即是柏拉图,在返回雅典后的作品之一,也就是在苏格拉底被处决之后。
She left, went far away, came all the way back a month later, and once again, got an audience with Gandhi.
她离开,长途返回,一个月后又回来,再次与甘地见面。
PROFESSOR: So, does anyone have any questions about the set up here, does it make sense what we're looking for the bar to go back once we make some progress.
教授:所以,有人对这套装置,有疑问吗,一旦我们,取得了一些进展,我们看到这个棒又返回来。
You put them into your environment as here, go alone and get back as soon as you finished.
为生活定下这些目标,独自离开,结束后返回。
I want to go back to elections and why do I want to go back at this point?
我会返回头讲选举,为什么我现在想返回去讲选举呢
It says if this is a string of length 0 or 1, I'm done. I'm going to return the answer true.
我就会返回答案为真,否则的话我得判断它。
So for example I defined p, remember back over here, as a Cartesian point, but I can actually ask for its polar form.
我可以要求返回它的极坐标形式,这里对我是可访问的,好,这很棒,请再记另外一个为什么。
In other words it doesn't just return when it finds one, it's going to run through all of them. All right?
但是它将会继续运行,换句话来说当它找到一个结果时,它不会立刻返回结果它会先遍历所有的内容?
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.
正如字面意义上说的,从这个函数返回,然后取得下一个表达式的值,并把这个值作为整个计算的结果返回。
1%10 So if you actually do in a program 11 percent 10, 1 what you'll get back is 1 because that is in fact the remainder of that arithmetic operation.
如果在编程里就是,返回,因为1是这个计算式的余数。
Let's test it in all possible combinations of x and y and see if we get the right answer.
来测试并看看,返回的结果正确不正确。
4 So even if the correct mathematical answer is 1.4 or whatever, when you divide an int by an int, you only have room in that variable, in the response for an actual integer.
所以即使那个正确的答案是4,或别的数值,当你用一个整型数除以一个整型数,在那个变量的返回值里,只有,存储一个整型数的空间。
And if we do, in fact, hit it with light to get the electrons off, it will go back to the straight up in position, or if it gets knocked hard enough it does that, too.
而且如果我们这么做,事实上,用光轰击它以逐出电子,它就会在原位置沿直线返回,或者如果它被撞击的足够猛烈,也会出现上述现象。
And it's just gathering together the multiplications while counting down the exponent. And you can see it when we get down to the end test here, we're going to pop out of there and we're going to return the answer.
这个方法就是通过乘法,来一个一个的减小指数,可以看到,最后面的结果测试,我们会在这里退出,然后返回答案。
Because it says, your program will still give you a value, but it may not be what you intended, and you can't always tell, and that may propagate it's way down through a whole bunch of other computations before it causes some catastrophic failure.
因为这意味着,你的程序依然会返回一个值,但是这个值可能不是你想要的,你可能还分辨不出来,而且这种情况会传播,结果会沿着正果计算过程传播下去,直到产生一个灾难性的错误。
Then if the weight of i is less than the available weight, I can return the value of i.
然后如果i的重量,小于剩下的重量,我将返回i的价值。
I'm going to call it down here with search, which is simply going to call it, and then print an answer out.
然后返回答案,在二分法搜索中,其实有个挺美妙的名称。
And when we return the string to you we're essentially telling you where this chunk of memory is.
当我们返回该字符串时,我们实际上是告诉你,这块存储单元位于哪里。
And then as soon as the function returns, you kinda have to unwind but remember where you were just a moment ago.
一旦函数返回,你必须记得之前在哪个位置。
And if it returns a value, you've got to do something with that return value too, much like we did up here.
如果它返回了一个值,你便用那个返回值,做一些事情,就像我们刚在上面做的。
Well, this allows us to try to go back and explain some phenomena that over the years, mounting evidence was building that couldn't be explained.
好了,这个可以使得我们,返回去然后去解释一些,以前逐年积累的未能解释的现象,我们下节课将讨论。
Do one comparison and return one of two possible orders on it, but I need to decide that.
虽然可以做一次比较,然后返回两个可能的顺序中的一个为结果,但是这需要我来做决定。
And along the way I'm keeping track of how many iterations at the end I'll print how many iterations I took, before I return the final guess.
提到的方法去运行,并且我会跟踪到底,进行了多少次迭代,并在最后返回结果之前,显示进行了多少次迭代。
It could run and give you the right answer, it could crash, it could loop forever, it could run and apparently give you the right answer.
它可能会正确运行,并返回给你一个正确的答案,它可能会崩溃,它可能会一直运行下去,它可能会运行并给你正确的答案。
Notice one last piece. If I'm going to do that, run through all possible answers, I still want to know, gee, what if there aren't any answers? How do I return that case?
注意最后一段,如果我要这样做,也就是运行所有可能的答案,我还是想知道要是没有结果呢?,在这个例子中应该返回什么呢?
I would think that it would approach inifinity, and I would need to think about it and get back to you in terms of why we don't actually hit it and see something with an infinite wavelength.
我会认为波长会接近无穷大,而且我需要考虑一下,然后返回来告诉你,为什么我们没有说对,为什么我们没有看到,无穷大波长的东西。
应用推荐