• I probably whip out a do while loop very rarely, but very often when programming games or any program that takes user input and has to check that user input and yell at the user if they're messing with you or aren't providing what's expected.

    我可能很少用do,while,循环,但常常是,当编制程序游戏或需要用户输入的程序是,需要检查用户的输入并提醒用户,如果他们干扰了你,或没有提供所期望的输入。

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

  • I can't rely on the user. I want to make sure I get a float in it, so how do I do that?

    我想确保这儿我得到的是一个浮点数,我该怎么做呢?

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

  • Well, the user, I don't know in advance what the user is going to type in, right?

    我不能预先知道,用户将要输入神秘,对不?

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

  • For those of you who aren't familiar with this, we split up the user base by what school they go to and we make it so that people at a given school can only see the profiles and contact information of people at their school.

    对此有些人可能不大了解,我们以学校为标准将用户分组,只有在同一所学校的学生,才能够相互浏览,个人资料和联系方式。

    斯坦福公开课 - 扎克伯格谈Facebook创业过程课程节选

  • How likely are all the inputs, are they all equally likely, or are they going to depend on other things? And that may depend on the user, so you can't kind of get at that.

    他们大致相同么?,他们依赖于其他事情么?,输入也跟用户有关,因此你没法完全得出结果来。

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

  • Let's assume that the user typed in a pretty short word we didn't run out of memory or anything crazy so here's the new feature.

    假设用户输入,很短的单词,没有出现超出内存之类的问题,这里是新的特点。

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

  • If you want to get some input from the user, my God I don't want to have to program it to low level zero and 1 just to get keys from the keyboard; please let there have been someone who does that for me and indeed there are an increasingly sophisticated options that you can pull off the shelf.

    如果你想获得一些用户的输入数据,我的上帝,我可不希望在键盘上敲入0,1的低水平方式来编程;,希望有个人能帮我做这件事吧,但是现有的选择,也变得日益复杂了。

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

  • I can't rely on Professor Guttag if I give this- if this code to him, I can't rely on him to type in a float. Actually I can, because he's a smart guy, but in general, I can't rely on the user-- I wouldn't do it right to see if you did.

    当Guttag使用这段代码的时候-,我不能相信他一定会输入一个浮点数,实际上我能因为他很聪明,但是总体上来讲,别相信用户一定会按照规则来-,我会故意做错来试试你的程序的。

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

  • So long as I say I'm gonna put a string here, it doesn't matter what string it is, GetString is gonna take care of the job of getting it from the user.

    把变量放在这,我们先不要管这个string是什么,GetString会负责,从用户那里获取该值。

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

  • So we'll talk a bit more about this idea of functions today, but, get int, again, can think of it as a black box, whose purpose in life is to prompt the human for input and pester the human if he or she doesn't actually give it int, but then once it has that, has entered it from the user, it's quote unquote, returns it to you.

    所以我们进今天将多讨论点这个函数的概念,但是,GetInt,我们可以把它当做一个黑盒子,它的唯一目的是提示人们来输入,并且如果他或她没有,给它int数,则会纠缠用户,但是一旦它得到了,用户输入的int数,对输入进行引用,返回给你。

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

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

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

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