Secretary Clinton said Wednesday that Bosworth had been prepared to travel to North Korea "at a moment's notice" during his first mission to the region last week, but said he regrettably did not get an invitation to do so.
VOA: standard.2009.03.12
Run merge sort on those. By induction, if it does the right thing, I'm going to get back two lists, and I'm going to then merge Them together. Notice what I'm going to do.
在这些上面再运行归并排序,根据归纳,如果这样是正确的,我将重新得到两个列表,然后我会把它们合并在一起。
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.
我现在运行了一对循环,再一次注意这个封装,抽象得很好,这就是我想要的结果,我按这种方式走到这一步的时候,可能会有多组答案。
Now, the first thing to notice is that to get the conclusion we need all three premises.
现在 首先要注意的是,只有三个前提全部成立才能得出结论
But notice how long it took us to get there, how many centuries it took.
但是要注意到这要多长时间,它花了多少个世纪。
s1 So for the fourth period, now we're into the 4 s 1 3d for potassium here. And what we notice when we get to the third element in 4s2 and the fourth period is 3d that we go 4 s 2 and then we're back to the 3 d's.
对于第四周期到现在我们来到钾的1,然后我们返回到,我们注意到当我们看到第三个元素,第四周期我们来到,然后我们返回到。
And notice, unlike Scratch where some of you might have realized it starts to get a little ugly, you have an "if else" and then you have another here and another one and things start to move and move and move like this, it gets very messy.
请注意,不像Scratch,在那里,你们其中某些人可能认识到它变得有点丑,你有一个“if,else“然后这里又另一个,那里又有一个,代码就像这样开始跳转,跳转再跳转,它开始变得有点凌乱了。
take the derivative of this, get the velocity vector and you notice his magnitude is a constant Whichever way you do it, you can then rewrite this as v square over r.
对这个式子求一次导,就能得到速度矢量,你会发现其模长是常数,不管用什么方法,加速度也可以写成 v^2 / r
And so, in fact, the version that I commented out which is also in your handout and I'm now going to uncomment, let's get that one out, get rid of this one-- notice the only change.
所以事实上,我之前注释掉的版本,你们的讲义上也有,我打算把注释去掉,我们把他拿出来,把这个丢到一旁,注意下唯一的改变。
So I can concatenate techs plus ivys and assign that result to univs, and then when I print it you'll notice I just get a list of five strings.
和ivys数组用加号串联运算,并把结果赋值给univs数组,接下来我显示下univs的结果,你注意到我得到了一个。
If it isn't, then I'm going to go back around the loop, and notice what happens. If I get all the way around the loop, that is, all the way through that FOR loop and I never find a path that takes me through here, then the last thing I'm going to do is return a pair or a tuple with a special simple number none twice.
如果没有,我会回到循环看看发生了什么,如果我运行了整个循环,也就是整个for循环,我仍没有找到符合条件的路径,那么我最后做的事情就是返回一对,或者一个数组的两次none值。
But notice what this does. The first thing it does is, it says, let's check and make sure x is greater than or equal to 0. If it isn't, notice what's going to happen. None of that block is going to get executed, and it's going to come down here and print out a useful piece of information, which says, hey, you gave me a negative number. I don't know how to do this.
做的是和以前一样的事情,但是注释它做了什么,第一件做的事情就是,程序说,要去检查并且确信x是大于等于0的,如果不是的话,请注意会发生什么,下面的代码都不会被执行,程序会到这里来然后显示一些有用的信息,信息会说,嘿,你给了我一个负数,我不知道该怎么弄这个了。
应用推荐