All right? The first one is, that test has to involve-- shouldn't have to, the value of some variable.
好不好?第一件事是,循环开始的测试必须必须-不是一定,一些变量的值。
So it doesn't matter how big the dictionary is, you can instantaneously retrieve the value associated with the key. Extremely powerful.
因为你可以在线性时间,内得到想要的键对应的值,这太强大了。
Right, so there's that special sentinel value that's back slash zero, which we'll start to see more explicitly now.
对的,这里有一个特殊的值“反斜杠0“,我们等下会更了解它。
So we know what that number would be, it would be negative 424 kilojoules per mole that we see here.
我们知道它的值是多少,它就是我们在这见到过的负,424,千焦每摩尔。
If you look on the Periodic Table this is 598 atomic hydrogen. And, sure enough, there is 13.598, which is this number here in electron volts.
如果你查找元素周期表上的氢原子,毫无疑问,它的电离能就是13。,这个数值也是电子伏的值。
Take the difference of the two velocities and divide by the difference of the two times, and you've got the acceleration.
求出速度的差值,除以时间的差值,这样就能得到加速度
You know, if you want to measure the potential energy of something in a gravitational field, you have to define the zero somewhere, right, because it's arbitrary. You can set it anywhere you want. It's the same with enthalpy.
你知道,如果你想测量重力场,中某种东西的势能,你需要,在某处定义一个零点,对吧?,因为势能的值是任意的,你可以把它设定在。
So this is one more example of stressing why I only want to come access to the instances through defined methods.
其他相关的值也会变化,我想要这些值会一起变化,这就是另外一个强调为什么。
By putting it in a function bug if I find a bug and I change my program I can just run the function again.
把我输入的值放到一个函数里,如果以后我在程序中发现了一个,并对程序进行更改的话,我可以直接。
Literally, return the control from this function, and take the value of the next expression, and return that as the value of the whole computation.
正如字面意义上说的,从这个函数返回,然后取得下一个表达式的值,并把这个值作为整个计算的结果返回。
Think about that. That says, if this thing has some particular value, I want to do one thing; otherwise, I want to do something different.
考虑考虑,这意味着,如果这个事情有一些特殊的值,我就去做一件事情;,否则的话,我就会去做另外一件事情。
It not only does something, as we'll see, it also gets something and it has to hand it back to me.
它不仅要做好自己的本分工作,还要将获取到的值返还给我们。
And in contrast, in the lower left hand part of the periodic table, these 2 quantities are low, so also what we're going to see is low electronegativity.
相反地,在周期表的左下部分,这两个量的值都很小,因此我们会看到这里的电负性也很低。
But this is a -- this raises a problem, that we'll see actually in just a moment having this duplication.
但这就引起了一个问题,我们刚才看到了,我们有一个重复的值。
And once I have values, I want to get a hold of them so I can give them names.
如果我有想保存的值,我可以命名这些值,也就是进行了绑定。
It sets the mean to 0, for s in stocks and then for s in the stocks, it moves it, giving it the bias and the momentum, then it shows the history.
它会让平均值等于,然后,它会改变它们的值,给它一个偏向值和股价势头值,然后它就会显示历史。
I'd really like to have that modularity that says, I'm only going to get access to the values, not by calling their names, but by calling some specific method to get access to their names.
这样我们就丢掉了代码的模块化,我很希望代码有这样的模块化:,我访问变量的值,不是通过直接调用它们的名字,而是通过调用某个可以,访问这些变量名的方法来访问。
So you're implementing this black box, and if its purpose in life is to actually return a value, you have to tell the compiler what kind of value to expect, and this is going to have ripple effects.
你在实现这个黑盒子,如果它的目的是,返回一个值,你必须告诉编译器你期望的是什么类型的值,这个将是一个连锁反应。
First, it's pointing to the beginning of the list, which initially might be down here at but after a while, might be part way through. And to that, I simply add a halfway point, and then I check.
列表中间的一个部分了,然后我求出列表的中值点,然后看看该点的值是不是等于目标值,如果是的话就完成了,如果不是的话,如果中位值大于我要找的目标值。
What comes out of the math is that the value of k, there are multiple values, there are multiple solutions.
得到的数学结果是k的值,这有多种值,多种解法。
No, we can't. Because if l equals 1, we can not have m sub l equal negative 2, right, because the magnetic quantum number only goes from negative l to positive l here.
不行,因为如果l等于1,ml的值不可能等于-2,对吧,因为磁量子数的值,这时只能从-1到1
Need to get the base in. Second thing I want to do, I need to get the height, so I'm going to input a value for the height, also as a float, a floating point.
也就是输入底的值,第二件我想要做的,事情就是得到三角形的高,因此我会输入一个值作为三角形的高,同样也是一个浮点数。
You know when you add 2 polar forms, you add the radii together, you don't add the angles together, you need to do it in Cartesian form.
表示形式的不同理解,返回给你了不同的值,这也就带来了一系列的问题,第二个问题是。
Now what I'm going to try and do is read in a set of values, but I'm going to give a type of value as well as the messages.
现在我要做的是输入一些值,并关注异常,我会输入消息以及一种其他的值。
So this means we can actually calculate this for any molecule that we've drawn the Lewis structure for, because we actually do need to draw the Lewis structure before we know, for example, how many of each of these we have, or at least go through the rules.
这意味着我们可以将原来画过,路易斯结构的分子的形式电荷计算出来,因为我们其实在画出,路易斯结构之后才能知道,比如,这些量的值是多少,或者至少我们需要经过前面的那些步骤。
What I mean by that is, pick a simple set of values, and let's walk through it to see what happens. And this is useful because it's going to allow me to A make sure that I've got something that's going to terminate, it's going to let me make sure that in fact I'm doing the right kinds of updates.
原因你们知道的,好,模拟代码,我的意思就是,选出一系列的值来,然后模拟下代码的执行来看看结果,这很有用因为这让我确保我的程序在某个地方,可以终止,还会让我确保实际上我。
Right? In other words I've got the stoichiometric coefficients in there and the values, and I'm subtracting the reactants from products -1652kJ/mol wind up with minus 1652 kilojoules per mole.
对吧?换句话说这里我用了化学,计量系数和生成热的值,从生成物中减去反应物,最后得到。
Remember when we have waves we can have positive or a negative amplitude.
记住一个波会有,正的幅值和负的幅值。
And the difference between those is what you could measure.
这其中的差值就是,我们测量的值。
And that's a wonderful thing to have because it gives you that modularity, that encapsulation that basically says, when I create a point, the only way I can get at the values, is by using one of the defined methods, in this case it could be Cartesian, Cartesian and get all the pieces of that.
这是很棒的一件事情,因为它让你有了,模块性以及封装性,这基本上也就是说,当我创建了一个点,我能够得到它的值的唯一的方式,就是用一个定义好的方法,在这个例子中也就是。
应用推荐