It could be, preconditions I want to have on input It could be, explanations of specific things you're doing.
也可以是我对输入的预期是什么,也可以是,对代码,正在进行的特定操作的解释。
A log algorithm typically is one where you cut the size of the problem down by some multiplicative factor.
对数级复杂度的算法就是指,通过一系列常量级步数的操作,可以将问题的规模。
We can do the same thing for the other observed kinetic energy.
我们还可以对观测到的,其它动能进行同样的操作。
And more generally, the problem is you can talk about what other people do in terms of reinforcement and punishment and operant conditioning and classical conditioning.
更加一般性的问题便是,你可以用强化和惩罚,操作性条件作用,以及经典条件作用之类的术语,来解释他人的行为。
And the nice thing is that there's a shared behavior there. Just as I can have tuples as an ordered collection of things, strings behave as an ordered collection of things.
共享的行为,就像元组是有序的元素序列,字符串也是有序的元素序列,因此我可以对字符串做同样的操作,我可以把它们连结起来。
So it makes sense to be able to say, look for many methods I do want to have a way of doing comparison, and I don't have to remember, at top level, what the name of the comparison method was.
所有我需要的对象进行操作,那么就可以这么说了,我想要在很多方法里面,去找做比较的方法,我并不需要记住,每一个比较的方法的名字。
You don't see strings with commas between them, but it has the same kind of property. It is in ordered sequence of characters.
它是有序的字符序列,我们可以对字符串做同样的操作,我们也可以得到字符串中的一块。
And I haven't said yet, how do I get that collection, but you could certainly conceptualize that, if I had that collection, that would be nice thing to do. That is a more common pattern.
也可以这么来操作,这是个更常用的模式,这基本上也就意味着,对于某些数据的集合,我想要一个循环机制。
And then I could do things like again, say, okay having done, that let me just run it here, run that, so I've now got polar point 1, and polar point 2.
然后给它们赋值半径和角度,然后我可以进行刚才的操作,也就是说,对刚才的笛卡尔坐标进行的操作,让我们来运行下它吧,运行下,现在我有一个极坐标点。
On the other hand, if the value I'm looking for here- sorry, the value I'm looking for is smaller than the value I see here, I just need to look here. All right?
如果我的目标数比这个值要小呢?,我就在这边找就对了,对不对?,做完了这一步,我可以在下一步做相同的操作,假设我选中了这一分支?
We have some set of things we want to do with strings, and different set of things we want to do with numbers.
这就对了,我们有一个可以对字符串,进行操作的方法集,还有另外一个不同的。
Or another way of saying it is, we're going to use as the basic steps, those operations that run in constant time, so arithmetic operations.
我们用可以在恒定时间内完成的操作,算法,比较,内存读取。
In a particular, I have similar operations on strings.
尤其是我可以对字符串使用类似的操作。
I could do the same thing, I could build polar point.
很多笛卡尔点,我可以做一些同样的操作。
What is this? This is a wonderful piece of abstraction. It is saying, you don't need to know squat about what's inside the body of this function. You don't have to worry about the parameter names, because they're going to be preserved, you don't need to worry about how I'm doing it, this tells you how you can use this, in order to use it correctly. Of course, I can then close it off, and off we go.
但是这能告诉你一些信息,这是什么?,这是一段完美的抽象,它的意思是你不需要知道,这个函数的内部构造,你不必担心参数是否重名,因为它们已经被预存了,你不需要担心我如何使用它,它告诉了你你该如何操作,从而正确的使用它,当然我也可以把它关掉。
These are instances of a class, and associated with that class are a set of methods things that I can deal with.
但是Python的基本思想是相同的,这是一些一个类的实例,这个类关联了一个方法集,我可以做的一些操作。
I can write it explicitly. I can write it inside of a FOR loop. And we've started to add, and we'll see a lot more of this, examples of collections of structures so that we don't just have to do something that can be easily described as walking through a set of things but can actually be a collection that you walk through.
我可以明确的写出来,我可以把它在FOR循环的内部写出来,然后我们开始学习了add这个运算符,我们会在以后学习很多的,集合的数据结构的例子,这样一来我们可以进行一些,很简单的遍历集合的操作,我想要为大家指出的最后一件事情是。
应用推荐