It's going to run through the loop, accumulating the answers, but because I'm subtracting, x it's just going to keep making x more and more negative as it goes along, again it's off into an infinite loop.
它一直在循环,不断的累加答案,这是因为我一直在对x做减法,这使得作为负数的,变的越来越小,又进入一个无限循环了。
Remember, we don't do a one-to-one correlation, because p x and p y are some linear combination of the m plus 1 and m minus 1 orbital.
记住,我们不需要把它们一一对应,因为px和py轨道是,m等于正负1轨道的线性组合。
This is saying, that's a class, true or sorry, an instance of a class, and I'm going to get the x value associated with it.
那么两个点是同一个点,我会返回,注意格式,这儿的意思是,它是一个类,噢对不起。
If I do x equals 42, I'm not going to put the 42 here, where am I going to put it?
如果,x,=,42,我不会把42放在这里,我把它放在哪里?
It's like I've got ESP or I'm some character out of the X-Men, Is that what it's called? The X-Men right?
好像我有超能力或者我是X-Men,是叫X-Men吧
I'm not asking Is this person stage Mr. X the same person stage as SK 2007.
我不是在问,这个阶段的X先生,和2007年的我是不是同一阶段。
For the x part, I'm going to write x = x0 + v0 t.
对于 x 分量,有 x = x0 + v0 ? t.
I'm plotting--this is the probability of various values of x/n.
这里是x/n等于各个值的概率
Otherwise, I'm going to get a new guess by taking g, x over g, adding them, 2 and dividing by two.
或者呢,我会有一个关于g的新猜想,就是X大于g,将二者相加,然后除以。
So this first little piece of code right here says, ok you give me 2 points, I'll create another 1 of these lists and I'll simply take the x, sorry I shouldn't say x, I'm going to assume it's the x, the x-values are the two points, add them together, just right there, the y-values, add them together and return that list.
好,为了来认识到这一点,让我们来看一个简单的小例子,在你们的课堂手册上,你可以看到我写了一个小程序,它假设我得到了,这些点中的一些,我想对它们做一些操作,例如我想把它们加到一起,那么这里的第一小片,代码的意思是,好给我两个点,我会再创建一个数组。
I'm going to say, gee, p2 is the x value the same in both of them, and if it is, and the y value's the same, then this is the same point, I'm going to return true.
这样的数据对象,我会把它们命名为p1和,我会去查看,看看两个对象中,的x值是不是相同,如果相同的话,就去查看y值是否相同。
I said both the x- and y- coordinates are bigger, then I'm going to return something to it.
我说过如果x和y坐标,都是更大的。
malloc I'm going to now use this new, fancy function called malloc and I'm going to say x gets the return value of malloc of the size of an int.
我现在使用这个新的,别致的函数,然后我指明x,=,malloc的int型数据的大小,的返回值。
So we can have, if we have the final quantum number m equal plus 1 or minus 1, we're dealing with a p x or a p y orbital.
所以如果我们有,磁量子数m等于正负1,我们讨论的就是px或者py轨道。
And when I create a binding, x I'm taking a variable name, in this case x, stored somewhere in a table, and I'm creating a link or a pointer from that name to that value.
当我创建一个绑定的时候,我有一个变量的名字,在这个例子中是,存在一个表中的某处,然后创建一个连接,或者指针从这个名字指向目标值。
Let's call x the thing I'm trying to find the square root of. Let's start at 1. Square it.
让我们把求平方根的对象,这个数称为x,让我们从1开始。
But here, if I decide I'm going to store things not in x and y, but with some other set of names, for example, I've gotta go back into these pieces of code that use the points, and change them. So I've lost modularity.
除了要改下借口,但是这里,如果我决定,我不把值放在x和y中,而是和其他一些变量名进行绑定,例如这样的话,我就得回到使用这个点的代码,那儿去做更改了。
Meaning, why in the world do I have to tell the reader that I'm binding x to the value three? All right?
意思就是,我为什么要,告诉代码阅读者,要把x绑定到3这个值上呢?,对不对?
And I think in the polar one I said, if, what did I do there, I said, yeah, again if the x and y are greater than the other one, I'm going to return them to it.
然后我要返回一些值,我认为在极坐标的形式下我说过,如果,我在这里做了什么来着,我说过,对,再说一次,如果x和y坐标。
1 Similarly, if m is equal to either plus 1 or minus 1, py we would in turn call it the p y orbital, or the p x orbital.
类似的,如果m等于+1或,我们可以叫它,或者px轨道。
X I'm passing an X, and yet I'm also assigning the return value to X. So just intuitively what's going to be the effect of this one line of code?
我传一个X,之后我把返回值赋值给,很明显,这一行代码,将会产生什么作用?
The first statement right here, that's just an assignment statement, I'm giving some value to x.
第一个声明在这里,这仅仅是一个赋值声明,我赋值给x一个值。
I'm passing as input the value in X, which is two.
我把那个值当输入传给X,那个值是。
I'm binding x, y, and iters left to some values.
我将x,y和iters,left绑定到一些值上。
If you say, "Add the vectors, " I would just add the x to the x and the y to the y and I'm keeping track of what the sum is.
如果你们说 " 将矢量相加 ",我就把同为 x 轴方向的分量相加,同为 y 轴方向的分量相加,然后就能得出这两个矢量的和是多少了
Then, if n = 100--now I'm going to label this x differently, I'm now going to show the normal bell-shaped curve and I'm going to do this from 0 to .4.
如果n=100,现在我得重新标x值,我现在要画正态分布的钟形曲线了,在这儿用0到0.4
Mathematically complete problem is that you can find the function x of t by saying that the second derivative of the function is equal to -k over m times the function.
这个数学问题就是,你可以求出函数 x,只要令函数的二阶导数,等于 -k 除以 m 再乘以函数
So it's OK to not specify. I want to point out, pz whether you're in the p x, the p y, or the p z, unless a question specifically m asks you to specify the m sub l, which occasionally will happen, but if it doesn't happen you just write it like this.
我想指出的是,无论你在px,py或,除非一个问题特别地,让你指出l下面的,这种情况有时会发生,这样就可以了,但是如果它不做要求你们写成。
And I'm actually going to change it.
看看x坐标和y坐标。
So, what we have found out so far, I'm purposely going from x to y because I want you to know that the unknown variable can be called an x or can be called a y.
到目前为止,我们有这些结论,我特地把x换成y,因为我想让你们明白,未知变量既可以写成x,也可以写成y
应用推荐