• Notice in this program I have not checked whether or not the user actually provided input.

    就拿这个程序说事吧,我们根本没有检查,用户到底有没有输入。

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

  • So now, in a program and you're asking the user for a string.

    我们再回到程序里,向用户要一个字符串。

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

  • 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的低水平方式来编程;,希望有个人能帮我做这件事吧,但是现有的选择,也变得日益复杂了。

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

  • So if I type "man sleep," this is going to give me the user's manual for a program called sleep, but there's a gotcha and the problem set it makes clear, sleep notice that it says at top left sleep one.

    所以如果我键入“man,sleep“,它将,给我一个叫做sleep程序的用户手册,但是这里有个参考信息,它使问题更清晰,请注意它指明在左上角。

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

  • 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,循环,但常常是,当编制程序游戏或需要用户输入的程序是,需要检查用户的输入并提醒用户,如果他们干扰了你,或没有提供所期望的输入。

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

  • Go ahead and implement with the person next to you a program that takes as input from the user an integer called F and prints out the answer of the Celsius equivalent.

    继续和你旁边的人执行程序,取来自用户的整数F作为输入,然后打印出与之等价的摄氏温度的答案。

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

  • I'm going to use the CS50 Library instead for user input I'm saying say something then I'd get a string from the user and I call time s1 and then I say, say something, s2 and then I get another string from the user and call it s2 and apparently this program's purpose in life is to tell me yes or no the user said the same thing both times.

    然而我使用的是CS50库来获得用户输入,我说点什么,然后从用户那里获得一个字符串,并把它叫做s1,然后我说点什么,然后从用户那里获得一个字符串,并把它叫做2,这个程序的最终目的是,告诉我两次用户输入的是不是同样的东西。

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

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

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

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