Why don't we give Philip both the matching pair and give you each a pair of socks since he didn't get to wear this one, they are brand new, in fact, and a big round of applause for what I'm sure is a little difficult.
我们为什么不给飞利浦一双配对的袜子,给你们每人一双袜子,他还没穿这双袜子,所以这双还算是全新的,再次以热烈的掌声对他们表示感谢,这样的模仿还是有一些难度的。
In fact, your socks don't even match.
实际上,你的袜子都不是成对的一双。
But here, as we saw in week zero with the shoe example putting on socks, I have to increment this variable explicitly myself.
但是这里,像我们上周看到的,鞋子穿在袜子上,我需要亲自明确地增加这个变量。
Now, being the Lady, she pulls her socks up.
现在,作为一位小姐,她拔起她的袜子。
And here in the middle of the page a little ways down: My love's striped black-and-white cotton frock, jaunty blue cap, white socks and brown moccasins were not quite in keeping with the large, beautifully cut aquamarine on a silver chainlet which gemmed her throat, a spring rain gift from me.
在这一页中间偏下的地方:,我的小情人穿着黑白条子的棉布裙,带着鲜艳的蓝色帽子,白袜子和亮皮鞋与她脖子上那条优美的,蓝宝石项链有些不协调,这是由于那场春雨我送给她的礼物。
His Leatherstocking Tales are full of a certain anxiety about what might be happening to that frontier, what's coming from east to west.
他的《皮袜子故事集》里弥漫着某种焦虑不安,它讲述了西进运动开拓者们从东部来到西部,有可能会遇到的一些事情
In Philip's case, we ask the question, does he have zero or none zero socks on his feet?
在飞利浦这个例子中,我们就需要判断,他的脚上有没有袜子?
So this plus plus is sort of shorthand notation for incrementation. So just add 1 to this variable's value, so now socks on feet is of course 1 and so next.
那么这个++符号是递增排序的,所以仅仅是对这个变量加一,现在袜子在脚上是一,那么下一个也是这样。
Come on down. Your role has just been changed because you're not wearing any socks today.
过来吧,你的角色刚刚已经改变了,因为你今天没有穿袜子。
So, in fact we may not find a sock at all and yet we don't seem to handle that at all unless if we don't find any socks, what do we do?
实际上我们可能找不到袜子,并且不用处理那些事情,前提是我们没有找到任何袜子,我们做什么呢?
We saw this with the sock algorithm a moment ago.
我们前面看到了袜子算法。
Intentionally, I bought the worst socks I could.
我故意买了双最差的袜子。
+ Socks on feet plus plus.
袜子在脚上。
Look for matching sock.
找相匹配的袜子。
So here is an example of socks on feet being 0 the number of socks on Philip's feet which is in fact 0.
因此这里有个袜子在脚上的例子,在飞利浦脚上的袜子数量实际上是。
If you find a matching sock which you didn't so then else.
如果你找到相匹配的袜子就执行接下来的代码,否则就执行其他。
Okay, if you find the sock then put on sock.
好的,如果找到袜子就穿上它。
Socks on feet, minus minus.
袜子在脚上,减,减。
We replenish the sock drawer.
我们补充袜子到抽屉里。
Or rather, does he have two or not two socks on his feet?
或者他有没有两只袜子?
If there is no matching socks then what's gonna happen with Philip here?
如果这里没有匹配的袜子,那么飞利浦会怎么样呢?
Excellent, look for sock, alright.
太好了,找袜子。
Remove first sock from foot.
把第一双袜子从脚上脱下。
So the fact that line 9 did not match, if you find a matching sock which we didn't, that means we immediately jump to the else which is line 13 and so Philip now has to do what?
事实上,第九行我们没法匹配,如果你没找到匹配的袜子,这意味着我们立即跳转到第13行,所以现在Philip做什么?
应用推荐