In either event, if I'm looking at the last element, I return.
在这两种情况中,如果是最后一个,元素的话我就返回。
So you're going to figure out what happens in this story very generally, well not very generally, but in the particular case actually on the homework assignment, but I want you to understand that there's this much more general story underlying this, and this is a pretty good model of a lot of markets.
所以你们将找出,这样的例子里通常会发生了什么,也说不上太通常,只是在特定情况下,这个家庭作业中,但我想让你们明白,在这例子具有普遍性,且这对很多市场来说都是很好的模型
In Scratch you may have realized that, "I could implement my program this way with these puzzle pieces, but it kind of feels -- like I could use these puzzle pieces instead" -- that's absolutely the case in programming.
在Scratch中你可能已经意识到,“我可以用这一段代码来,执行我的程序,不过这有点感觉到,我可以用这些代码段来代替“,那绝对是编程中的一个情况。
When you're all out of specific cases and you want to handle everything else, you literally say "default:" And here I could end the program with break, but it's kind of unnecessary because once I'm at the bottom of the curly braces, that's it.
当它不在你列出的所有情况中,为了处理其他的情况,你可以用“default:“,这里我可以用break来终止这段代码,但是它是有点,不必要的,因为我已经在这个花括号的,底部了,就这样了。
应用推荐