All right, and initially, well, maybe initially, momentum just to be simple I'm going to start false momentum equal to false.
好了,首先,为了简单起见,我会让,先等于。
So you say to your friend, "Okay, I'll watch. I'll watch your kids. I'll watch them."
所以你跟你朋友说,“好吧,我会去的,我会照看你的孩子的。”或者“我会照看他们的。”
Yeah, it's kind of simple, but it gives me an ordered list of these things, And let's run it. OK.
让我们来运行运行吧,好,我会先去搜索一些数组中没有的元素,让我来试试,看-1在不在这个数组里。
We did figure it out, and we'll get there, but I want to do a little bit of work first.
我们已经算好了,我会告诉你们的,但我们得先干点事
And I say,Oh,that's very interesting that that knucklebone will be around 100 or 1,000 years from now.
我会说,很好,很有趣,指关节骨会继续存活成百上千年。
I would say, keep that to a minimum, because what the first formula tells you should be so intuitive that you don't have to cram this.
我会说,越少越好,因为对于第一个式子的内容,你应该觉得如此自然,以至于你都不用去记
When he said smelting, I said, OK, you got it.
当他说熔炼,我会说,好,你明白了。
And I say, "I am fine. How are you?"
我会说,"很好,你呢?"
So we're going to hear a solo by Louis Armstrong now and let's count along once the phrase begins. I'll get you started and then you count the measures. Here we go.
下面我们听一段路易斯·阿姆斯特的独奏,同时音乐起奏时,我们就开始数,我会提示你们开始,然后你们开始数小节,准备好
Ok, on Friday nights, I do go out to Hollywood, that's where I go.
好,周五晚上,我会去好莱坞,我去那里。
Any questions? All right, tomorrow I'll go through the remaining details.
有没有什么问题?好,明天我会继续讲完剩下的细节。
We're going to re-up and do another term, and we're going to take the city.'" So, Agamemnon says, "Great, I'll do that," And he calls the troops together to battle, and he makes his little speech.
我们会再次应募,延长役期,我们将会攻下这座城市'",阿伽门农说,"好,我会这么做的",于是他把军队全都集结到了战场,并做了简短的发言
Okay we'll try to correct this problem.
好吧,我会解决下这个问题
Well, I've given a number who have quoted him on a number of reasons but one suggestion might be that it is not so much peace alone that Hobbes cherishes as life. Peace is a means to life.
好,接下来我会讲,有些人援引他的一些原因,但有一个可能是霍布斯,除了把和平向生命一样珍视之外还有其他。
I'm going to keep this secret like a good friend.
我会像一个好朋友那样严守秘密。
All right, I'll think it over.
好吧,我会考虑一下。
Is something in the set, or is table member something in the table? Well, what I would have written is something like table dot member.
在集合或者表中有没有存在过呢?,好吧,我会写的是,然后也可能是元素或者表格。
All right. The fourth thing I'm going to do, is I'm going to then construct the block of code.
好,我要做的第四件事情就是,我会去写这块循环代码。
Let me give you, I'm going to create, q a polar point, I'm going to call it q, and we'll give it some random values.
让我给大家讲解下,我要去创建,一个极坐标点,然后我会去命名它为,然后我给它赋一些随机的值,好,现在我想知道。
And here's a theory," well, then, I'll begin to take it seriously as an explanation.
这里还有一套理论,好吧,这样的话我会认真考虑这种解释
So this first little piece of code right here says, ok you give me 2 points, I'll create another 1 of these lists and I'll simply take the x, sorry I shouldn't say x, I'm going to assume it's the x, the x-values are the two points, add them together, just right there, the y-values, add them together and return that list.
好,为了来认识到这一点,让我们来看一个简单的小例子,在你们的课堂手册上,你可以看到我写了一个小程序,它假设我得到了,这些点中的一些,我想对它们做一些操作,例如我想把它们加到一起,那么这里的第一小片,代码的意思是,好给我两个点,我会再创建一个数组。
Some of you, unfortunately, won't do very good jobs at the beginning... and my TAs, I'll encourage them to be prepared to give Ds.
其中有些人,很遗憾,在开始时表现不会很好。,我会鼓励我的助教们做好给D的准备。
You divide and you find it's 9 and you say, "Okay, I know what to do with Newton's laws."
除一下,会得到 9,然后你说,"好了,我会用牛顿定律了"
I will try and improve the handwriting, there's not much I can do about the accent at this stage.
我会努力写好板书,但是口音暂时不太好改
And then it has a beautiful illustration of psychological testing, so I'll give you them quickly one after the other.
也很好地解释了一个心理测试,我会很快为大家逐一讲解。
shell What I have here is a Python shell, and I'm going to just show you some simple examples of how we start building expressions.
好,这是一个Python的,我会给大家看一些,关于写表达式的简单的例子。
b OK. In this example I'd use b. All right, as b get-- b is the thing that's changing as I go along here, but it could be things like, how many elements are there in a list if the input is a list, could be how many digits are there in a string if the input's a string, it could be the size of the integer as we go along. All right.?
好,在这个例子里我会用,因为b是一直在变的东西,但是也可能是如下情况:,如果输入是数组的话,变化的就是数组的元素数,如果输入是字符串的话,变化的就是字符串的长度,如果是integer的话,可能就是这个数的大小,对不对?
I'm going to come back to that in a second with that, but I need to do one more example, and I've got to use my high-tech really expensive props. Right. So here's the fourth or fifth whatever we're up to, I guess fifth example.
并且我会用到我的,高科技的昂贵小道具,好,这是第四个还是第五个了?,好,我猜是第五个例子了,这是个被称为汉诺塔的问题。
Well, I'm going to create a little infinite loop.
好,我会建立一个小的无穷循环。
应用推荐