Oh, I could cheat and make, OK the upper bound a half, but that wouldn't be very honest.
噢,我可以像作弊一样,把上界扩大两倍,但这看起来没什么用。
So, academic honesty: very simply, you can't cheat in 3.091. Is that shocking?
学术诚信,非常简单,这门课你不能作弊,很吃惊吗?
I can tell you the answer, but that's because I've cheated, run the program before.
我可以告诉你答案,但这是因为我作弊了,我之前运行过一次程序。
You're looking at the book. You're cheating.
你在偷翻书,这是作弊哦。
Because you won't want to do everything from scratch yourself, you want to be able to look at what is being created by somebody else and understand what is inside of there, whether it works correctly and how you can build on it This is one of the few places where plagiarism is an OK thing.
因为你们不会想无论做什么事情,都由你们自己亲自上阵,你们希望有能力读懂,别人创造的语言,并了解其中的内涵,运转的正确性和如何在其基础之上继续发展,这是为数不多的,合理的作弊行为之一。
Although we'll come back to plagiarism as a bad thing later on.
但是我们之后会回到,怎么做就算是作弊这个话题上来。
No cheating! You know this.
不能作弊,你们知道的。
OK, once it gets to the end of that, what's it going to do? It's going to come down here and, oh. What's that doing? Well I cheated when I started. I said, somebody's giving me a perfect square, I'm looking for the square root of it. But suppose 15 I gave this thing 15, and asked it to run.
好,一旦到了循环的最后,程序会去做什么?程序会跳到这里来,噢,这是干什么的?好吧,当我开始的时候我有点小作弊的意思,我说过,我得到了一个完美的平方数,我要求这个数的平方根,但是假设下我得到的数是。
I'm given an integer that's a perfect square, and I want to write a little piece of code that's going to find the square root of it. All right so I'm cheating a little, I know it's a perfect square, somebody's given it to me, we'll come back in a second to generalizing it, so what would the steps be that I'd use to walk through it?
完美平方数的整数,我想写一段代码来求这个数的平方根,好,我这儿有点儿作弊了,我知道这是一个完美的平方数了,他们给我的,我们后面会讲怎么产生这个数的,那么我想解决这个问题,需要什么步骤呢?
应用推荐