All right? The first one is, that test has to involve-- shouldn't have to, the value of some variable.
好不好?第一件事是,循环开始的测试必须必须-不是一定,一些变量的值。
Now the part of the essay just prior to this explains that he gave this little quiz that you see to some college students when he was giving a lecture.
在先前已经解释了这篇文章的一部分,他把你们所看到这个小测试在他的讲座上,给一些大学生做了。
What I am talking about today, I will not be testing you, but maybe you might pay attention because about a month from now we will ask you a few skill testing questions about it.
我说的是今天,我等会不会测试你,但是你可能会重视了,因为一个月之前,我们问了你关于一些测试的技能。
OK. Now, that's a nice simple little test, let's look at a couple of other examples to get a sense of what this will do.
好,那么这是一个很好的小测试,让我们看看其他的一些例子,来明白这个主要用来做什么的。
All right. So let's test what we, in fact, know about the photoelectric effect, and before we do that actually, we're going to calculate what we would predict, so when we do the demo it will be meaningful and we can tell whether we're successful or not.
好的,我们来测试一些,我们实际上懂了,多少光电效应的东西,在我们做测试之前,我们先算一下我们能预知什么,这样我们做的测试会很有意义,并且也知道我们是否成功了。
But before telling you about this let me sort of Go through some of the hypothesis that we have and That we are now testing about why the subject is Difficult and why these materials assembled what We have assembled them might be useful.
但是谈那之前我要说说,我们之前的一些假设,我们现在正在测试为什么这个学科很难,以及为什么我们整合这些资料是有用的,我们认为把它们整合起来或许有用。
It's in here to--intended to do two things: One to show you something about the method that we will be using in here and two, to show you something of the level of this course-- the level of the course.
这个测试的目的是,第一,向你展示一些我们的教学方法,第二,告诉你本课程所处的水平,本课程的水平
Along the way I have some tests, and depending on the value of that test, I may change where I am in that sequence of instructions.
我会按顺序进行一些测试,按照测试的数值,我会改变之指令序列中,我的位置。
Testing and reasoning. Testing, we run our program on some set of inputs.
测试就是,我们输入一些信息,并且运行我们的程序,然后查看答案。
Wednesday will be the test, Test 1, and I will say a few words about that, coverage through the end of lecture on Wednesday.
星期三会有测试,测试,我将说一些关于考试的事,周三的考试内容,涉及到这节课的末尾部分。
OK. Today, for the rest of the lecture, we're going to take a break from the topic of algorithms, and computation, and things of the sort. And do something pretty pragmatic.
好,今天剩下的时间里,我们不再讲算法,计算和排序这些话题了,我们会做一些非常实用的事,我们主要的讲讲测试。
I would love to make predictions that you cannot test.
我很乐意做一些你们无法测试出的预测。
That was the kind of thing you saw. Asserts said here are some conditions to test. If they're true, I'm going to let the rest of the code run.
这就是你看到的,断言是一些测试条件,如果他们为真。
All right, if this is purely a test of, if this is true do this otherwise I don't care, I don't need the ELSE clause in there to identify it. All right?
好,如果这真是一个测验,用来测试如果是真的那么进行一些操作,否则的话我不在乎,那么我不需要ELSE语句,来进行声明了对不对?
Remember last time, we wrote this simple piece of code to print out even or odd. If, you know, x, 1 it was in fact, even or odd. So let me show you what a flow chart for that would look like, because I want to make a comparison point here.
这就像这里有一些脚蹼一样,首先进行测试,然后把球这样放来让ANS加,然后回来继续测试,最终跳出循环然后打印答案。
So we have if, and that is followed by, I'm going to use angle braces here just to indicates something goes in here, some test followed by a colon.
那么我写了if,后面跟着,我这里会用一个角括号,来代表这里有些东西,冒号后面跟着一些测试。
应用推荐