OK. I get the two values in, what do I need to do, well, you sort of know that, right?
好,有了这两个输入值了,我接下来将要做的,你知道对不对?
Ok, different neighborhoods. Well, as far as the yoga community in New York, I would say that it tends to be very young.
好吧,分社区吧。就纽约的瑜伽社区而言,我觉得它还很年轻。
But at the time, they didn't have a well-formed name for it, they were just saying OK, there's this fourth quantum number, there's this intrinsic property in the electron.
但在那时,人们没有给它取名,他们只是说ok,这是第四个量子数,这是电子的本征性质,
So I can in a very straightforward way say, OK, well, here is my Helmholtz free energy.
所以我可以很直接的说,这就是我的亥姆赫兹自由能。
Now for many of you,when you look at this you may say, "Well,Ok,yes,change is possible.
你们可能会说,“好吧,改变是有可能的。
Well, let's try it. Let's try a little test. OK?
不过我们还是来试试吧,做个小测试怎么样?
Ok, well, you know in Phantom, it starts at...
是的,《歌剧魅影》刚开始是这样的……
Well, ok we're talking about 1980 and life was a little different in 1980.
好吧,这是在1980年,生活是截然不同的一番光景。
Oh, well, ok, my story in acting.
哦,好的,那我就讲讲我的表演故事吧。
Ok, well... I actually, I've only been on two dates on "OkCupid".
好吧,其实我也只是在OkCupid上相过两次亲。
OK, well.I'll try to explain this, This is a picture that was taken about 50 years ago.
好吧,我试着来解释一下,这张图片大概是50年前拍的。
Barnyard1 OK. The change is, well, on Barnyard 1 it looks much the same as it did for Barnyard.
也就是solve1和,做出的变化就是在Barnyard1中。
Five seven, well ok five six and a half is not enough to teach happiness?
米70。。。是1米69不够格传授快乐吗?
OK, well, now, let's get to the big ones.
好,现在考虑最重要的问题。
Knowing that, I'm going to say, OK, how many pigs are there, well that's just how we're, however many I had total, minus that amount, and then I can see, how many legs does that give, and then I can check, that the number of legs that I would get for that solution, is it even equal to the number of legs I started with, ah! Interesting. A return.
它将给我返回头的总数,知道了这些之后我可以说好了,有多少猪呢,无论有多少组鸡的数目,我只要用总数减去那个值,之后我就可以知道一共有多少条腿,然后再把这个值和题目中的腿数相比较,看它是否等于一开始的腿数,啊!真有趣,有一个返回值。
OK, so how can I code this up? Well, you might think, let's just jump in and write some code, I don't want to quite do that though, because I want to show you another tool that's valuable for thinking about how to structure the code, and that is a something called a flow chart. Now.
好,那么我怎么把这个以代码实现呢,你可能会想,让我们进去直接写代码把,但是我不想这么做,因为我想教给大家另外一项很有价值的,用来组织代码的工具,叫做流程图,现在,像Guttag教授,和我这么大岁数的人。
chickens OK, and then once I've got that, well, notice: I can then check to see, did I return that special symbol none?
第二部分是:,现在一旦我获得了这两个值,注意,我将再检查一下?
OK. And how do I create them? Well, the representation is, following a square bracket, followed by a sequence of elements, separated by commas, followed by a closed square bracket.
就是一个有序的序列,好,那么我们怎么创建元组呢?,好,表达式是,一个方括号,后面是一系列的元素,以逗号分开,以一个闭方括号结束,这就是我刚才所说的。
Well I have to go to the zero-th element, and say OK, gee, to get to the next element, I've got to jump this here. And to get to the next element, I've got to jump to here, and to get to the next element, I've got to jump to here, until I get there.
再回到第0个元素,好的,然后找下一个元素,跳转到这里,然后再下一个元素,跳到了这里,然后再下一个元素,直到我找到那个元素,这样,我有方法来保存变长的元素。
应用推荐