• 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的话,也就是说数组中的元素小于等于,我对这两个元素进行比较,然后返回结果就可以了,否则的话,我们就去寻找中值,注意它是怎么实现的,首先这个指向一个列表的开头。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So this first little piece of code right here says, ok you give me 2 points, I'll create another 1 of these lists and I'll simply take the x, sorry I shouldn't say x, I'm going to assume it's the x, the x-values are the two points, add them together, just right there, the y-values, add them together and return that list.

    好,为了来认识到这一,让我们来看一个简单的小例子,在你们的课堂手册上,你可以看到我写了一个小程序,它假设我得到了,这些中的一些,我想对它们做一些操作,例如我想把它们加到一起,那么这里的第一小片,代码的意思是,好给我两个,我会再创建一个数组

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • And I keep cutting the problem down.

    那么我应该选取数组中的哪个呢?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • OK, for example, I might say point p1 is that list, x is 1, y is 2.

    和y坐标的数组是很简单的1,那么,例如,我可能会说

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • It's easy to think of a point as just a list of an x- and a y- coordinate.

    或者说有两个元素的数组,把一个认为是含有x坐标。

    麻省理工公开课 - 计算机科学及编程导论课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定