So, let me go had and let's swivel this around for just a moment so we have a blank slate and now what's really going on?
我把它旋转一下,这样就有一块空白了,到底发生了什么呢?
If I wanted you to care about an animal, I would do well to describe it as if it were human.
如果我想你关心动物,我就把它当成人一样描述。
I want to abstract that. And the abstraction you see, right here. I'm going to highlight it for a second so you can see it. I want you to look at it on the handout as well.
我需要进行抽象,这个抽象就在这儿,我把它强调给你们看看,我希望你也能看看讲义里的这部分内容。
If you multiply entry 23, which is 13.6 electron volts I will show you what the electron volt is in a few minutes. We will just put it up here prematurely. But that is given in your chart.
如果乘上第23个常量,代表13。6电子伏,接下来我就会向你们说明什么是电子伏,我们先提前把它提出来,但那只是放在你们的图表中。
Now I can measure that, because I pull it by one centimeter and I find the acceleration it exerts on a known mass.
现在就能测量这个力了,因为把弹簧拉伸 1 厘米,我就知道它让一个质量已知的物体产生的加速度
> David: At some point in time, I'm going to have to have declared the variable as a float before I can then hand it to printf as the insertion value for that format strength.
>,大卫:在一个特定的时间,我将需要,声明float类型这样的变量,那样我就可以把它打印出来,像是格式化优点的插入值。
swap I'm going to keep track of a little variable called swap, it's initially true, and as long as it's true, I'm going to keep going, but inside of the loop I'm going to set it to false, and only if I do a swap will I set it to true.
我打算跟踪一个小的变量称为,初始值为真,只要它是真的,算法就会继续,但是在循环里,我打算把他设为假,除非交换发生,就把它设为真。
Well I need to take that number and I'm going to turn it into a string. So notice what I'm going to do right here. I take that number and convert it into a string. That's an example of that type conversion we did earlier on. By doing that it makes it possible for me to treat it as an ordered sequence of characters.
我可能得把这个数字变为字符串,请注意我这里是怎么做的,我把这个数字,转化为字符串了,这是我们之前学过的,类型转换的例子,这么一来我就能把它按照有序的。
Because what I want to do is, 01 say if self dot price is less than 0.01, 0 I'm going to set it to 0, just keep it there.
因为我想要做的是,比方说如果self。price小于0。,我就把它的值设为,然后放在那。
应用推荐