Second thing we've got to worry about is, what's a basic step? All right, if I bury a whole lot of computation inside of something, I can say, wow, this program, you know, runs in one step. Unfortunately, that one step calls the Oracle at Delphi and gets an answer back. Maybe not quite what you want.
我们需要担心的第二件事情就是,什么该作为一个基本的步骤呢?,如果我把一大堆的计算过程放到里面,我可以说,噢,这个程序你知道的,一步就完成了,不幸的是,这一步可能要靠预言家才能得到答案,这可能跟你想要的结果不太相同吧。
This seems like a completely Christian answer to Zooey's problem, and we're back on the horns of that dilemma.
这似乎是左伊问题的基督教的回答,我们又回到了两难的境地了。
But we've just introduced it, so let's go back to the class notes and explain why this is the correct answer.
但是由于我们刚刚开始介绍它,因此让我们回到课堂讲义来解释一下,为什么这个是正确答案。
The answer is--this goes way back-- it's an old tradition and they used to have to do this by hand.
答案要追溯到很久之前,这是个古老的传统,他们过去用手工计算
Probably the best answer is our body is worn out during the day and sleep is necessary to put it back into shape.
最佳的答案应该是,一天下来,我们的身体已经疲惫了,有必要进行睡眠,以恢复状态。
The answer would come back and the priests would give a response that would be essentially straight.
神谕会带来答案,而祭司也会传达出尽量直白的回答
In this case, I'm going to get back the answer 3 F-O-O because the user typed in F-O-O, but wait a minute, what's with this?
假若这样,我得到了答案3,因为用户输入了,等一下,用这个干吗?
And those are two things that you'd like to do with every looping construct you write: you'd like to be able to assure yourself that they will always terminate, and then the second thing you'd like to do, is to assure yourself that it does give you back a reasonable answer.
就是现在我有了能去检查程序,是不是做了正确的操作的能力:,这就是你们在写每个循环程序的时候,都要注意的两个事情:,第一件事情是要确保程序可以终结,第二件你要做的事情,就是要确保程序返回了正确的答案。
We don't have to worry about how you solve it, but it's problem in mathematics and the answer will be--surprise, it's going to be oscillating back and forth and that'll come out of the wash.
我们没必要去担心这个方程该怎么解,但这个数学问题的答案将会是令人惊讶的,弹簧会来回振荡,问题就迎刃而解了
To begin to answer this question you might say even begin to think about it in the right way requires that we stand back from Aristotle's text for a while and ask some fundamental questions about it.
若要开始回答这个问题,你也甚至可以说,开始以正确的方式思考这个问题,需要我们,暂时放下亚里士多德的大作,回头提问一些基本的问题。
Well, for the answer to that we have to go back to ancient Greek music theory, and when you read about this--it's really turgid stuff-- but believe it or not, I teach a course on this at the graduate level.
这个,要回答那个问题,恐怕要追溯到古希腊的音乐理论,每次读这些都会云山雾罩的,不管你信不信,我曾在研究生中开过这个课程
Now, to answer that, I'm going to back up one more level.
现在为了回答这个问题,我会退一小步。
And then, I'm going to skip down a little bit: Though she never again called back any image of the dead man to dress up, pose, talk to and make answer, neither would she lose a new compassion for the cul-de-sac he'd tried to find a way out of, for the enigma his efforts had created.
接下来,我会跳过一些内容往下说:,虽然她从没有想起过,那个死人穿衣、摆弄姿势、,说话和回答问题时的样子,她也不会失去对他的同情,对他尝试摆脱,无路可走的困境所付出的,谜团一般的努力。
It could be the pair of none, none, it could be the pair of, you know, whatever the answer was that we put up there. That value comes back out and is now available inside the scope of Barnyard. OK. And Barnyard then uses that. Question?
也可以是,你知道,任何我们在这里得到的答案,这个返回的值在Barnyard范围内,就可以使用了,然后Barnyard就使用了这个值,有什么问题吗?
And in fact, now let me ask those two questions about this piece of code. First question is, for what values of integers-- we're going to assume integers-- but for what values of x does this code terminate? And the second question is, for what values of x does it give me back the right answer?
实际上,让我关于这块代码问两个问题,第一个问题是,对于什么样的整数值,我们会假设是整数,对于x的什么值程序,会最终终止?第二个问题是,对于x的什么值程序,会返回正确答案?
Conversely, if you get an answer and it doesn't seem to make sense, then you've got to go back and ask, am I violating some of the assumptions, and here you will find the assumption that the particle had that acceleration a is true as long it's freely falling under gravity but not when you hit the ground.
反过来说,如果你得到一个结果,发现似乎是错的,那么你就应该回过头来问问自己,我是不是违反某些前提了,这个模型中,你就发现,只要质点在重力作用下自由下落,质点具有加速度a的前提是正确的,但是落地后就不成立了
I'm going to get back to your answer in a second because you're heading in the right direction.
内嵌的循环,这儿,我们做了m次,但是它内部还有一步呢,对不对?
应用推荐