We had out of Norway, a program where a student developed a new type of ski sock that had a special padding in it, and was actually able to get a patent on that and has taken it to market and been very successful.
VOA: standard.2009.12.04
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?
实际上我们可能找不到袜子,并且不用处理那些事情,前提是我们没有找到任何袜子,我们做什么呢?
If you find a matching sock which you didn't so then else.
如果你找到相匹配的袜子就执行接下来的代码,否则就执行其他。
So this is an 'in shoes', be careful where we are here, this is an 'in shoes in shoes' argument, at which point you might want to invent the sock.
所以这是一个不断换位思考式的过程,注意一下这里的措辞,这是一个换位再换位思考的过程,说明我们也要换来换去思考
Okay, if you find the sock then put on sock.
好的,如果找到袜子就穿上它。
We saw this with the sock algorithm a moment ago.
我们前面看到了袜子算法。
Excellent, look for sock, alright.
太好了,找袜子。
Remove first sock from foot.
把第一双袜子从脚上脱下。
Look for matching sock.
找相匹配的袜子。
We replenish the sock drawer.
我们补充袜子到抽屉里。
And so when you start to poke around the puzzle pieces, you see that it can say things, we'll see movement in just a moment and sound and so forth, but at the end of the day, this is just like the program we used a moment ago for the sock exercise where we just hold Philip a step after step after step, do this, do this, do that, and yet, here too, we already see an opportunity for that thing we called the loop.
如果你认真看下这些拼图,你会发现它都是一些移动,并发出声音的功能块,就像我刚才的,练习程序一样,我们让飞利浦做这个动作,做那个动作,跟这里的情况一样,我们已经看到了称为循环的东西。
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做什么?
应用推荐