And it's just gathering together the multiplications while counting down the exponent. And you can see it when we get down to the end test here, we're going to pop out of there and we're going to return the answer.
这个方法就是通过乘法,来一个一个的减小指数,可以看到,最后面的结果测试,我们会在这里退出,然后返回答案。
You just need to pass their test, and then you can practice as an attorney.
你只要通过他们的测试,然后你就可以当律师了。
And then notice the structure, WHILE I got a keyword WHILE, there's that color identifying it, and in parentheses I have a test.
然后注意这个结构,有一个关键词,颜色就可以区分出它了,然后括号内是个测试。
Then they'll give them two other cities that they've never heard of and ask them how far apart they think they are.
然后测试者会给被测试者另外两个城市,他们同样没有听说过,然后问被测试者两座城市之间的距离。
And then he had them take a comparative and control group an intelligence test and a memory test.
然后他对比他们和对照组的,智力和记忆力测试结果。
The test of this then is to have blind auditions where people do their auditions behind a screen so you can't tell whether they're man or a woman, or for that matter, white or black or Asian or whatever.
然后他们进行闭幕试演以作测试,演奏的人被一块屏风挡住,看不出演奏的是男人还是女人,或者白人还是黑人,亚洲人还是其他人。
That means that a group of people who were identified and then re-measured every other year on -to getting blood tests and other biological markers, as well as doing assessments of their lifestyle behaviors and a number of other things.
就是说有一群特定的人,然后每隔几年,就要接受血液及其他生物学测试,还要对他们的生活方式等进行评估
And when I'm done with the whole thing, before I end the increment of the variable, you know, when I'm done, I'm just not returning anything out.
在循环外面初始化它,然后做一个终结测试,然后在循环内部有一个指令集,在这个例子中,就是对余数做检查,然后显示信息,当我完成了整个循环。
All right. Second question: or maybe a better way of saying this, and the general format you're likely to see here is, a test involving a variable name, which must be initialized outside of the loop, and which interior to the loop gets changed, so that the test is going to change.
好,第二个问题:,换种更好的方式来说吧,你们通常喜欢的,方式是,这个测试涉及到一个变量名字,变量在循环外已经被初始化,然后循环内部会改变这个变量的值,因此测试结果会改变。
So I've now set the price, and then I've got this test here.
我会设置价格,然后在这边会有测试。
I can build class stock, and I can test class stock, before I have a class market.
我可以建立一个stock类,然后在有macket类之前测试这个类。
Well, you could just try it and see if it works, right? That's what testing is all about.
你可以仅仅的去试试运行程序,然后看看结果对不对?这就是测试的内容。
And again, she ran the eye test.
然后她又进行了一次视力测试。
They're inside that loop-I've got the wrong glasses so I'm going to have to squint- and we've got one test which is a comparison we've got another test which is a multiplication-- sorry, not a test, we've got - another step which is a multiplication- and another step that is a subtraction.
他们在循环里面呢,我带错眼镜了所以不得不斜视-,然后我们这里有一个比较的测试,还有一个乘法的测试,-对不起,不是测试,是另外一个乘法的步骤-,还有一个减法的步骤。
We're checking the end test and incrementing, actually I was going to, I commented that out for a reason you'll see in a second, but I, normally I would keep this on, which would let me, at each step, see what it's doing. If I ran this, it would print out each step. Which is helping me make sure that it's incrementing the right way.
对不对?进行终结测试然后递增,实际上我要,因为某些你们,马上要明白的原因我把这里注释了,但是我通常会一直这么做,这样能让我看到每一步都做了什么,如果我运行这个程序,它会在每一步都,进行显示,这能帮助我让我确信程序是,在以正确的方式递增。
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加,然后回来继续测试,最终跳出循环然后打印答案。
应用推荐