What I want to do today is three things: I'm going to start-- actually, I shouldn't say start, I'm going to do a little bit of administrivia, the kinds of things you need to know about how we're going to run the course.
今天我要做三件事儿:,我要开始了--其实不应该说开始,我准备做一点儿文案工作,也就是关于怎么上课的,一些你们必须知道的东西。
Nonetheless, having done that, let's look at what I'm going to do. I now want to run a loop where I need to collect things together.
尽管如此,讲完了这些,让我们去看看,我将要进行的操作,我想要运行一个,需要把东西收集起来的循环,我要命名它。
First, let's run through some other things that might be appealed to as candidates for feature F.
首先,让我们来了解一下其他,那些备选的功能特征的诉求对象
Now we can think about the fourth period, and the fourth period is where we start to run into some exceptions, so this is where things get a teeny bit more complicated, but you just need to remember the exceptions and then you should be OK, no matter what you're asked to write.
现在我们可以考虑第四周期,而且在第四周期,我们会遇上一些特例,所以事情有,一点复杂,但是你只需要记住,这些特例然后就没有问题了,无论你被要求写什么。
But the other reason to go through the thermodynamic cycles and really to develop great facility with them is because there are just an awful lot of things in nature and things that we build that run in cycles, where we want to calculate the thermodynamics, right.
但是要推导热力学,循环并为之发展一套,完善方法的另外一个原因是,自然界中或人造的那些,我们想计算它们的热力学的东西,有很多是以循环的方式运作的。
And we're going to talk about food and the psychology of it, the biology, and the politics, and this morning I'd like to run through what I mean by those things and what the course is going to be all about.
我们将讨论食品以及有关食品的心理学,生物学和政治学,今天早上我会讲解,这些都是什么意思,以及这门课将怎么进行
Right. Those things are going to stack up, and eventually it's going to run out of space.
不用占用其他空间的算法,对,这些东西在运行的过程中会累积起来。
It took me seven comparisons, because I can take advantage of the fact I know I only ever have to look at the first element of each sub-list. Those are the only things I need to compare, and when I run out of one list, I just add the rest of the list in.
进行了7次对比,因为我可以利用我知道的优势:,每次只需要比较每个子列表的第一个元素,那才是我需要进行对比的内容,当一个列表的元素处理完了,只需要将另一个列表剩下的元素直接添加进去。
I guess it's not macho enough, John, to just, you know, you know, go off and do things by hand, you ought to just run them, but it's a valuable tool to get into, so let me do that here.
我认为这不太男人了,John,你知道的,他们仅仅是认为比起用手做来,更应该直接去运行程序,但是这确实是调试代码的非常有价值的工具,让我在这里给大家演示下吧。
I'm going to give a name to that. And what you see there is I'm going to call divisors initially an empty tuple, something has nothing in it. Right here. And then I'm going to run through the same loop as before, going through this set of things, doing the check.
你们可以看到这里,我初始化一个空的元组,名为divisiors,这里,然后我会去运行,跟以前一样的循环,遍历这个集合内的东西,然后做检查,现在我要做的是,每次我找到了一个除数我要把它收集起来。
应用推荐