All right. I was going to do one more example, but I've run you up to the end of the time.
好,本来想再讲个例子的,但是我想该下课了。
There's one right up on Columbus right there.
哥伦布环岛那儿就有一家。
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.
去取这个数的,每个数字然后把他们加起来,啊,这是个循环机制对不对?,我得找到一个遍历它们的方法,一种简单的方法可能。
All right, so let's take things up slightly to a more interesting one.
好的,让我们开始学习一个稍微,更有趣点的程序。
In contrast, if we talk about a double bond, what we're now talking about is having both a sigma bond and also one pi bond. And I apologize, I intended to set this up right before class, but that didn't happen today.
相反,如果我们讨论一个双键,我们现在讨论的是,一个sigma键和π键,抱歉,我应该在课前就把这个装好的,今天没装好。
Right, one the things you can see now is, we start building up classes, we get these methods.
实际上是相等的,好,你们现在,可以明白的一件事情是。
OK? And in fact, if you look at the code up here, and it's on your handout, the very first one, x 1, right here- if I could ask you to look at it-- is a piece of code to do it. And I'm less interested in the code than how we're going to analyze it, but let's look at it for a second.
实际上,如果你看看,你们课堂发的材料上面的代码,第一页上的,就是那-,大家请看看实现的这一部分代码,我不太关心,我们会怎么解释这个代码,首先让我们先看看。
应用推荐