So p dot Cartesian is a kind of accessor, it's getting access to the data.
这就是为什么,我想要使用访问器的原因。
And check the answers, and say yeah that's what we expected. But it also involves reasoning. About why that's an appropriate set of inputs to test it on it.
然后说对,这就是我想要的结果,但是它跟推理也有关系,表现在关于为什么这是一个,测试我们程序的适合的输入集。
So this really rips the material that I'd like to cover in this brief conversation with you.
这就是,我在和你们这段简短的,交谈中想要含盖的内容。
If you want the book, that's the book I use.
如果你想要买,这就是我要用的书。
And so that's what I now want to do.
这就是我想要知道的。
There's my one. I need a whole step.
这就是我想要的,一个全音级
Well that's a--so it's sort of tongue in cheek, 'you know this is really good, I love to eat this, but I'm doing it because it's good for me' is the message there.
它有种特别的口感,"你知道这真的非常好,我喜欢吃它,但我吃它更是因为它对我有益",这就是我想要表达的
All right, I want to do one more at homonuclear example here, and this is n 2.
好的,我想要再讲一个同核的例子,这就是N2。
Take many of you through graduation When you leave Yale, what do you want--like, "I had X sexual partners, " and that's what I wanted" ? Or your lifetime?
如果你们多数都毕业了,当你们离开耶鲁时想要什么,诸如,“我有过X个性伴侣,那就是我想要的“,在你这一生呢?
OK, so what have I done? I just added a little bit more now. I'm now running through a pair of loops. Again notice the encapsulation, that nice abstraction going on, which is what I want. Once I get to this stage though by the way, there might be more than one solution.
我现在运行了一对循环,再一次注意这个封装,抽象得很好,这就是我想要的结果,我按这种方式走到这一步的时候,可能会有多组答案。
So if I were to solve this problem, here's the way I would do it. I would say, first thing I want to do, is I want to input a value for the base as a float.
如果我想要解决这个问题,这就是我要解决它的方式了,第一件我要做的事情就是要,输入一个浮点数作为三角形的底。
x and get the values of x and y attached to this thing and return them to me.
和y值然后把它们返回给我,It’s,going,to,go,off,这就是我想要的东西,我想要我的类里面有一些方法。
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的变量,初始值设为。
Is the first part. That says, I took the branch through here that eventually got to the end and said, there wasn't a solution, in which case I'mgoing to print out, there ain't no solution, otherwise I'll print out the pieces. All right, let's check it out. Ah, what did I say?
我是否返回了特殊的none值?是第一部分,这里的意思是我从这个分支,走到这儿最终走到最后,并告诉我这条路没有解决方案,也就是我想要打印的结果,没有符合的结果,否则我会把它们输出来?
应用推荐