Let's test it in all possible combinations of x and y and see if we get the right answer.
来测试并看看,返回的结果正确不正确。
For example, let's pretend that you are speaking with a friend who had been studying for a test for some time.
例如,我们假设你跟一位朋友在聊天,他已经为一门考试复习了好一段时间。
All right. So we've got it now let's test it. So we're going to do here we're going to run compare methods.
很抱歉,那些坐在后面的同学,想往前面来的请自便,我们已经做好准备,让我们去试一下,我们接下来将要做的就是。
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.
好的,我们来测试一些,我们实际上懂了,多少光电效应的东西,在我们做测试之前,我们先算一下我们能预知什么,这样我们做的测试会很有意义,并且也知道我们是否成功了。
Well, let's make predictions that can be put to the test.
好了,让我们做些能够被测试出的预测。
With this basic principle of utility on hand, let's begin to test it and to examine it by turning to another case, another story, but this time, not a hypothetical story, a real life story, the case of the Queen versus Dudley and Stevens.
有了这条最基本的功利原则,让我们检验一下这条原则,是否适用于另一案例,而这一次,就不再是假定的事件了,是个真实的故事,女王诉达德利和斯蒂芬斯案。
Let's say that your test at school is happening the next day.
假设第二天学校就要考试了。
Let's check it out. I've written a little bit of a test script here, so if we test cell sort, and I've written this so that it's going to print out what the list is at the end of each round, OK.
我们来检查检查,我写了一个小测试脚本,我写这个脚本来测试单元排序,它能够打印出每一轮结束后,链表的是什么样子的。
Well, let's try it. Let's try a little test. OK?
不过我们还是来试试吧,做个小测试怎么样?
The closest it does is it would let you test.
它顶多能让你检查你的计算。
Well let's see. Where's the end test on this thing?
那让我们看看吧,我们来看看最后一次比较?
So let's assume we've run our test suite.
让我们假设已经运行了测试集。
Let's try it again. Test bubble sort.
让我们再试一试吧,测试下冒泡排序。
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.
好,那么这是一个很好的小测试,让我们看看其他的一些例子,来明白这个主要用来做什么的。
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.
这就是你看到的,断言是一些测试条件,如果他们为真。
Well, let's do the smoke test number one: is the mean more or less what we expected?
好了,让我们先做1号发烟测试:,这个平均值是和我们想要的答案差不多吗?
Well, let's try smoke test two.
好了,让我们来试试发烟测试2。
All right, let's test it.
好,让我们做个测试。
For the latter, this is a place where running test cases would do a good job of helping with that. Nonetheless, having done that, let's look at a better way to write this. Which is right here it is also, I think, on your sheet, I'm going to uncomment that, and comment this one out, yeah. All right?
对于后者来说,运行测试用例,对它会有很大的帮助,尽管如此,讲完了这些,让我们再来看看更好的,来写这个程序的一种方法吧,也就是这里,我想这程序也在,你们的课堂手册上面,我得先把这里取消注释,然后注释掉这里,是的,对不对?
OK.Let's look at the code-- actually, let's test this out first before we do it.
因此我已经添加了,就像Guttag教授做的那样-啊,应该这么说。
So I guess I should go back, and let me do this correctly this way. Again, I can look at test, test and I guess test now if I want to get the element out-- angle bracket or square bracket?
但是这不是我想要的对不对?,我认为我该回到这里,让我改正这个错误,好,那么我还是对元组,那么现在我想从test中取出元素来?
应用推荐