• So, inside of code, or inside of a script, there's no print, unless we make it explicit.

    因此,在代码里面,或者在脚本里面,不会有显示结果的功能,除非我们让它这么做。

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

  • Right, so here's a little piece of code that's going to print out the smallest value of three.

    好,那么这一小段代码,就是会显示出,三个值中最小的来。

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

  • You need to, if you want something to be printed out inside your code, you need to tell the machine to do that.

    你需要,如果你想要,在代码显示一些东西的话,你需要告诉机器这么做。

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

  • 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的变量,初始值设为。

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

  • But notice what this does. The first thing it does is, it says, let's check and make sure x is greater than or equal to 0. If it isn't, notice what's going to happen. None of that block is going to get executed, and it's going to come down here and print out a useful piece of information, which says, hey, you gave me a negative number. I don't know how to do this.

    做的是和以前一样的事情,但是注释它做了什么,第一件做的事情就是,程序说,要去检查并且确信x是大于等于0的,如果不是的话,请注意会发生什么,下面的代码都不会被执行,程序会到这里来然后显示一些有用的信息,信息会说,嘿,你给了我一个负数,我不知道该怎么弄这个了。

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

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

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

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