So it's certainly at least linear in the length of the list. For each starting point, what do I do?
它至少是线性的计算列表的长度,每次到了循环开始的点?
And I mentioned on Wednesday that computer scientists do 1 in fact start counting from zero not one.
在星期三,我曾经提到过计算机专家,从0开始计数而不是。
OK, so let's go through this and see what we would do which is to calculate the heat and the work. This is well insulated.
好的,让我们开始然后看看,我们该怎样计算热量和功的大小,这是完全绝热的,所以。
And so we can actually think about how do we calculate what the dissociation energy should be for h 2, so let's go ahead and do this.
因此,我们其实可以想到应该如何计算,氢分子的离解能,那么我们开始做一下吧。
The point I'm trying to make is, fixed-program computers is where we started, but it doesn't really get us to where we'd like to be.
我要指出的一点是,我们从固定程序计算机开始说起,但它并不能让我们到达我们想去的地方。
When they started to calculate how much rice would be need to fill up all blocks, all the way to 2 to the power 63.
当他们开始计算,需要多少粒米填满所有方格时,从第二格到第63格。
On the other hand, if the balance from here on out would've been negative, then it's good for me that I died now instead of being kept alive with a life not worth living.
另一方面,如果从现在开始计算其结果是负数,那么我现在死去就是好事,因为我不用不值地活着。
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的话,也就是说数组中的元素小于等于,我对这两个元素进行比较,然后返回结果就可以了,否则的话,我们就去寻找中值点,注意它是怎么实现的,首先这个指向一个列表的开头。
And that's when things really get interesting and so this just hints at the types of thinking that one can derive from the field of computer science and apply either to the field itself of computer science, or whatever domain it is that you are here too study.
这样就开始有意思起来了,这仅仅是我们从计算机科学领域,获得的一些思维方式上的启示,这种思维方式不仅适用于计算机科学本身,也同样可以应用在其他的学习领域。
Good. OK. Let's talk about computation.
好了,嗯,咱们开始讲讲计算机。
I want to talk about the goal of the course, what it is you'll be able to do at the end of this course when you get through it, and then I want to begin talking about the concepts and tools of computational thinking, which is what we're primarily going to focus on here.
我想讲讲课程目标,也就是当你们完成了这门课时,应该达到的程度,接下来我想开始谈谈,计算思维的概念和方法,即这门课程的核心内容。
That's an important observation, and as we get to the part of the course we talk about computational complexity, you'll see that what we really care about is not how efficient the program is on easy problems but how efficient it is on hard problems.
我们已经学习了这门课程的一部分了,我们要开始认识到,计算的复杂度这个概念,你会学习到我们在乎的并不是,算法在简单问题上的工作效率,而是解决复杂问题的效率。
itself and introduce Scratch, the programming language in an environment we looked at, but also some of the fundamentals that we'll lace throughout the course.
这周五我们就开始讲计算机科学,并在我们设定的环境下,介绍编程语言Scratch的用法,而且我们也会在课程中,捎带讲一些基础知识。
应用推荐