Three plus five. I can take something to a power, double star, just take three to the fifth power.
+5,我也可以,求一个数的次方,例如求3的5次方。
So in terms of nitrogen that starts off with a valence number of 5, again we have 2 lone pair electrons in the nitrogen, and again, we have 6 electrons that are shared.
对于氮来说,我们应该从五个价电子开始,同样,氮也有两个孤对电子,共用电子的个数也一样,是六个。
So if I wanted to represent, for example, this is the set two, six and eight, I put a one in those slots.
所以如果我想表示的话,比如,这是2,6,8的集合,我放置一个数在这个位置中。
It weights big deviations a lot because the square of a big number is really big.
使偏离的权重更大,一个数的平方是一个更大的数
So with an integer, an int data type, you can store any number between 0 and 4 billion roughly.
只要有一个整数,一个int型的数据,就能储存任意一个,位于0到40亿之间的一个数。
Suppose I want to find all the divisors of some integer, I want to figure out what all the divisors are that go evenly into it.
也就是遍历所有的整数来寻找,一个数的平方根,让我们再来看一个例子吧,为了找出另外一种的解决方法。
So then in order to figure out the complete number of valence electrons in our molecule, we just add 5 plus 4 plus 1.
那么接下来为了得到,这个分子中价电子的总个数,我们只需要将五加上四,再加上一。
So to figure out bonding electrons, -- what we take is that number 18, which is our total number of electrons we need to fill valence shells, and we subtract it from our number of valence electrons, which is 10.
那么为了找出成键电子,我们将十八,也就是填满所有价壳层,所需要电子的总个数,减去我们所有的价电子的个数,也就是十。
This was using something called a bisection method, which is related to something called binary search, which we'll see lots more of later, to find square roots.
你应该想起来,我们是以一个,叫做二分法求平方根的问题结束的,它运用了二分法去求一个数的平方根,二分法和我们将要花很多时间。
If you have an experiment and the outcome of the experiment is a number, then a random variable is the number that comes from the experiment.
如果你有一个试验,这个试验的结果是一个数,那么相对应的随机变量,指的就是这个试验结果所对应的那个数
And the next number is the sum of the previous two.
是前两个的和,再下一个数是前两个数的和。
Is the square root ever going to be less than 0?
一个数的平方根会小于0么?
For our step two, what we need is number of valence electrons.
我们的第二步,需要知道价电子的个数。
Got a simple square procedure,.
其实是一个很简单的求一个数的平方的过程。
But that little short hand there is doing exactly the same thing. It is adding that value into some digits and putting it back or signing it back into some digits. And I'll walk through that loop and when I'm done I can print out the total thing does. And if I do that, I get out what I would expect.
加上得到的这个数的,但是这个缩写声明其实是进行了同样的操作,它把我们得到的这个数加到一个数上面去,然后用和对这个数进行了重新赋值,在循环中会去遍历字符串,当完成循环后,程序会显示数字的总和,如果我运行,这个程序的话,我会得到我期待的结果。
Instead of summing them and dividing by M, I multiply them all together and take the nth root of them.
我把所有的乘在一起然后开n次方,而不是把他们加总再除以个数
I have it down that there might be an infinite number of possible values for the random variable x.
对于这个随机变量X,可能的取值个数是无限的
So, if you look at all of these, we have full octets for all of them, and if we count up all of the valence electrons, it's going to be equal to our number 26 here.
那么,如果大家看看所有的这些,它们的“八隅体“都填满了,而如果我们来数一数价电子的总个数,它应该就等于我们这里的二十六。
So, if we want to figure out the formal charge on the carbon, we need to take the number of valence electrons, so that's 4. We need to subtract the lone pair, what number is that? It's 2.
如果我们想算出碳原子的形式电荷,我们需要将价电子的个数,也就是四,减去孤对电子的个数,它是多少?是二。
So, if you can't immediately know, and you don't all have periodic tables in front of you, so that's fine, but if you have a periodic table in front of you, you need to be able to count valence electrons, so work on that if it doesn't come naturally to you in terms of figuring that out.
如果你不能马上想到,而且你手上没有周期表,那还好,但如果你面前有一张周期表,那你就得具备从中查出价电子个数的能力,如果你不能自然而然地想到,请在这方面多下点功夫。
And then 1/2 of the number of shared electrons.
然后再减去共用电子的个数的一半。
And obviously, when I get to something whose square is equal to x, I've got the answer I want, and I kick it out.
大于x的时候,我已经经过了,想要的答案了,很明显,当我得到一个数的平方等于x的时候。
And in this case, we go from 8 to 4 to 2 to 1 three times and then on each iteration of this algorithm, each pass across the board I'm touching N numbers, so that means I'm doing N things, log N times.
在这个例子中,我们从8得到4,到2,再到1,是3次,在这个算法的每次迭代中,每一趟我都会操作N个数,也就是所我每次要做N步操作,一共要做,log,N,次。
And that idea was, we make a guess in the middle, we test it so this is kind of a guess and check, and if the answer was too big, then we knew that we should be looking over here. If it was too small, we knew we should be looking over here, and then we would repeat.
这些有理数是有序排列的,然后我们的想法是,首先在中间取个数作为猜想数,然后对这个猜想数进行验证,如果由猜想数得到的答案太大,我们知道应该跳过,比猜想数大的那个区间,如果太小的话。
I'm using it as an abstraction, saying I'm going to have square root from somewhere, maybe I'll build it myself, maybe somebody gives it to me a s part of a library, so I'm burying the details inside of it.
我把这个方法作为一个抽象来引用,意味着我将会从另外一个,地方去求一个数的平方根,可能我会自己写这个方法,也可能我会从别人写的lib中去引用,因此我将实现的细节放到了其他地方。
a w And the amount of weight available, a w, for available weight.
合适的重量的个数是,也就是available,weight的简写。
Where n'th is somewhere between and 2 in this case.
而在这个例子中第n个元素,就是2和5之间的一个数。
On the other hand, we've seen n that if the size of a is n, that's to say, we have n elements to choose from, then the number of possible subsets is 2 to the n.
另一方面,我们看到,如果a集合的大小是,也就是说我们有n个元素可供选择,而可能的子集的元素,个数就是2的n次方。
应用推荐