And then hash character takes in any string or character, single character, gives me back a number. Notice what I do.
然后哈希接受任何字符串或字母,单个字符,返回给我一个数字,注意我要做什么。
that people often do notice in films.
而这是人们常常可以在电影里发现的。
You'll notice that a lot of different kinds medications do you have chlorine in them, you'll see that c l group.
你会注意到很多不同类型的药物都含有氯,你会看到这类氯。
And then, when I got- I'm also going to count how many comparisons I do, just so I can see how much work I do here, and then notice what it does.
并能看到算法干了些什么-,然后是如果这个索引,比数组的大小小的话,就意味着还没检索到数组的最后。
Well, notice again, on each level of the tree, when I actually do the merging, so this remember, is when I wrote down just the numbers when I bottomed out with the list of size 1.
请注意,在这棵树中的每一层,我真正做合并时,就将每个大小为1的列表中的,数字写下来。
And notice again, just to emphasize the point, the relevant lack of belief here has to do with the death of the body.
为了加深印象,请再度注意,在这里信念的缺失,是和肉体的死亡密切相关的。
By the way, when you guys do this, did anybody notice prime?
顺便问一下,你们刚才听课的时候,有人注意要加撇吗
So what do we notice about this landscape?
对于这个场景,我们看出了什么?
And what do we notice?
我们注意到什么?
Do you ever notice this in musical compositions?
大家是否注意到了音乐的结构
Okay, now we're making some progress. What do we notice?
好了,现在我们学到东西了
Run merge sort on those. By induction, if it does the right thing, I'm going to get back two lists, and I'm going to then merge Them together. Notice what I'm going to do.
在这些上面再运行归并排序,根据归纳,如果这样是正确的,我将重新得到两个列表,然后我会把它们合并在一起。
This half, I'm gonna put my finger on the 1 and notice I can do the same thing.
这一半,指向1,注意到我可以做同样的比较。
And then, if I want to find out if something's there, I do the same thing. But notice now, hash is converting the input into an integer.
然后,我想查找出某些元素是否在列表中,我做同样的事,但是现在注意,哈希是将输入转化成一个整数,所以,其思想是什么?
OK. So. Why did I do it? It's a simple example, I agree, but notice what I just did. It allowed me to highlight, is the code doing the right thing?
这是一个简单的例子,我同意,但是请注意我刚才是怎么做的,我通过它想要强调,代码是做了正确的?
So what do I want you to notice about this?
我希望你们注意什么呢?
But notice what I have to do here.
请注意我在这里所做的。
Otherwise, notice what it says to do.
否则,观察代码是怎样做的。
self y Notice what I also do here, I create self dot y, give it a value, and then, oh cool, I can also set up what's the radius and angle for this point, by just doing a little bit of work.
我创建了,然后给它赋值,然后,噢太酷了,通过做一点额外的工作,就可以得到点的半径和角度了,好,实际上如果。
Well I need to take that number and I'm going to turn it into a string. So notice what I'm going to do right here. I take that number and convert it into a string. That's an example of that type conversion we did earlier on. By doing that it makes it possible for me to treat it as an ordered sequence of characters.
我可能得把这个数字变为字符串,请注意我这里是怎么做的,我把这个数字,转化为字符串了,这是我们之前学过的,类型转换的例子,这么一来我就能把它按照有序的。
Notice what this says to do.
请注意这是什么意思。
And that shows you one other nice little thing we want to do, which is if I look in this code notice I set up a variable up here called false Solution Found, initially bound to false.
这显示了我们想要做的另一件事,那就是我在这段代码中设置了一个,名为Solution,Found的变量,初始值设为。
The key thing to notice is, I now have the ability to create iterations, which extends well I can do.
要注意的关键点是,我们现在已经学会如何去创建迭代了,这大大扩展了我们能做的事情的范围。
take the derivative of this, get the velocity vector and you notice his magnitude is a constant Whichever way you do it, you can then rewrite this as v square over r.
对这个式子求一次导,就能得到速度矢量,你会发现其模长是常数,不管用什么方法,加速度也可以写成 v^2 / r
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?
注意最后一段,如果我要这样做,也就是运行所有可能的答案,我还是想知道要是没有结果呢?,在这个例子中应该返回什么呢?
Notice what happens if I do the following.
好,这是十分合理的事情。
So notice what I'm going to do.
请注意我要去做的操作。
Before we do that, or as you do that, let's look at Fib 1. The key thing to notice about Fib 1 is that it has the same specification as Fib.
我们做之前,或者当你在思考的过程中,让我们看看Fib,1,Fib1重要注意的,关键的一点就是,他和Fib的格式描述是一样的。
And notice, by the way, if I do that, and I type sqrt and open the paren, ah-ha! It shows me what the creator, in this case actually I stole this from John so what Professor Guttag put up as his specification for this piece of code.
它需要什么养的输入和其它我想传达的信息,如果我这么做了,我将会到这里打上sqrt并且加上括号,啊哈!这里告诉我这段程序的创建者,事实上这是我是从约翰那里偷来的,所以也就是Guttag教授在它的。
应用推荐