So what would I want to do? I'd like to somehow walk down each of the digits one at a time and add them up. Ah, that's a looping mechanism, right? I need to have some way of walking through them.
去取这个数的,每个数字然后把他们加起来,啊,这是个循环机制对不对?,我得找到一个遍历它们的方法,一种简单的方法可能。
Man, you're going to really make me work here, I have no idea if I can get it that far, ah your friend will help you out. Thank you.
我不知道我能不能扔那么远,你的朋友会帮你的,谢谢!,那位同学完全正确。
Ah,that's an interesting problem we will have to get to at some point.
这是个有趣的问题,我们有机会要讨论。
Ah, many of you have seen it, it's a great film. It's a true story, it's about Fountainebleu, which is southeast of Paris, sort of a fancy place, and it's about his childhood about French schools. My kids have been in French schools for many years so I know about these places.
人不少啊,是部好电影,是真实的故事改编的,关于枫丹白露,在巴黎东南,一个豪华的地方,关于他童年的,你会学到关于法国学校的事,我孩子在法国,学校念了好多年所以我知道
But I can also ask for parts of this. So I can, for example, say give me the first element of s1 string 1, s 1. Ah, that's exactly what we would have thought if this was represented as an ordered sequence of things.
然后返回一个长字符串,我也可以,取字符串的一部分,例如,我可以要求返回给我字符串,的第一个元素,啊,这证明我们之前,认为的它是一个有序的字符序列的想法。
All right. If you flip to the second side of your handout, you'll see that I have a piece of code there, that does this-- let me, ah, I didn't want to do that, let me back up slightly- this is the algorithm called search.
你可以看到实现这个功能的代码,让我,额,我不想这么做,让我们回来一点,这就是命名为search的算法-,我们来看看这个算法吧。
应用推荐