• I will be posting code that you can play with, and I suggest you go through exactly this kind of exercise.

    我给你一些你用的上的代码,我建议你们,多进行一些这种实验。

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

  • And for reference, incidentally, in case you ever forget what the point of some exercise was, I'll almost always comment the code up top with a quick sentence or two that reminds you what this program does.

    顺便作为参考,为了避免我们可能忘记一些代码的意思,我通常会用一两个简单的句子,在上面作出注释,那样会提醒我们这个程序是干嘛的。

    哈佛公开课 - 计算机科学课程节选

  • And that then let's me get to, basically, base this code. Having done that, height I simply call base with get float, I call height with get float, and do the rest of the work.

    现在让我们看看这段代码,其实已经写好了,我简单的调用下,用来得到一个浮点数,再调用下,来得到另外一个浮点数,然后做剩下的工作就可以了。

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

  • Right. So similarly, if you've got one line of code with a semicolon at the end saying, this is the end of the statement, it doesn't really make sense to continue that conversation to try to continue conceptually that puzzle piece with curly braces.

    对的,类似的,如果你得到了一行代码,后面有一个分号,标志语句的结尾,这就没有意义来继续,那个会话来尝试对那段代码,使用花括号。

    哈佛公开课 - 计算机科学课程节选

  • So, it frees you from some of Apple's tethers and this was the code that circulated on the Internet iPhone with which people could crack their iPhones.

    这样我们就从苹果的约束下解放出来,这些代码是在网站上流通的,使用它们可能损坏你们的。

    哈佛公开课 - 计算机科学课程节选

  • People make really stupid decisions and so as you know in this course with P sets there are three axes that we look at when evaluating your code.

    人们做了一个愚蠢的决定,在这个课程上,通过习题集,当执行你的代码的时候,有三个评估方面。

    哈佛公开课 - 计算机科学课程节选

  • So let's actually see how we solve this with this function with actual code.

    然我们看看怎样用,这个函数和代码解决这个问题。

    哈佛公开课 - 计算机科学课程节选

  • I'm again, iterating with this four loop, same code as before.

    我再次,重复使用for循环,同样的代码。

    哈佛公开课 - 计算机科学课程节选

  • But what looks like this orange block as of now in Scratch, add orange to your so called inventory, well, it's gonna take at least two lines of code in C to actually create the inventory array with this first line and then put something like the word orange inside of it.

    就好比Scratch里面橘色的这一块,把“桔子“加到所谓的“清单“里面去,在C语言中至少需要两行代码来实现,第一行代码创建一个货单数组,第二行就需要把“桔子“放进去。

    哈佛公开课 - 计算机科学课程节选

  • So in other words, if you terminate these lines early, if you terminate the four loop early, if you terminate an if condition early with that semicolon, the code may very well work; and this is a common source -- of frustration and conundrum because you don't -- because your code looks right and yet it's misbehaving, but that semicolon means stop looking for subsequent lines of related code.

    换句话说,如果你用分号过早的终止了这些代码行,如果你过早地终止了那个for循环,如果如此,一个if条件,代码可能可以运行,这就是,挫折和问题产生的源头,因为你没有-,因为你的代码看起来是正确的,但是运行是错误的,那个分号的意思是,停止寻找后面相关的代码。

    哈佛公开课 - 计算机科学课程节选

  • So here is the simplest program which is perhaps an ironic statement that you can implement with this language called C. So it takes a few lines of code to actually get something up and running and as you'll recall last Friday, I didn't even get this up and running because part of the process of writing a program is to one, write it.

    让我们回到这个最简单的程序,你们也许觉得啼笑皆非,这么简单的例子,用C语言写出来就可以了嘛,的确只需要几行代码,就可以让这个程序跑起来,就像上周五的那样,我之所以没让它跑起来,因为编程步骤之一,就是“写“

    哈佛公开课 - 计算机科学课程节选

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

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

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