One of the advantages of this is, that I don't have to worry about explicitly updating my variable. That happens for me automatically.
这样继续下去,这样做的一个优点是,我不用为更新变量来发愁了,程序会自动的为我进行这个操作,这一点很好。
By putting it in a function bug if I find a bug and I change my program I can just run the function again.
把我输入的值放到一个函数里,如果以后我在程序中发现了一个,并对程序进行更改的话,我可以直接。
The strategy then often is to figure out how, what sort of program can solve these problems and then we go on to ask, "How could this program be instantiated in the physical brain?"
心理学家们通常要先弄清,什么样的程序可以解决这些问题,然后我们会接着问到,"这个程序在我们的生理大脑中,是如何进行编译的"
Then there are some who say the real problem here is the lack of consent, whether the lack of consent to a lottery, to a fair procedure or, Kathleen's idea, lack of consent at the moment of death.
还有人认为,真正的问题在于,没有征得同意,不管是没有征得同意抽签,用公平程序进行,或者是凯思琳所说,没有征得派克的同意杀他。
What I'm more interested in here than in the result of the simulation, is the process of creating it.
然后你们可以进行思考,我对这些过程,比对仿真程序的结果更感兴趣。
So in fact, it is the case, if you look at data, and by the way, that's the way I ended up setting a lot of these parameters and playing with it, was comparing what my simulation said to historical stock data.
所以实际上,在这个例子中,如果你看到数据,顺便说一下,这就是我设置很多变量,然后编程的方式,也就是把我的仿真程序得到的结果,和历史股票数据进行比较。
And when we do a simulation, we're pulling the samples from some distribution.
当我们写一个仿真程序的时候,我们就是从一些分布中进行了采样。
So the interpreter is simply operating directly on your code at run time.
因此解释器在运行程序的时候,会直接的对你的代码进行操作。
So before I try and run my program, I test each part of it independently.
因此在我尝试运行我的程序之前,我都会对它的每个部分进行独立的测试。
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.
对不对?进行终结测试然后递增,实际上我要,因为某些你们,马上要明白的原因我把这里注释了,但是我通常会一直这么做,这样能让我看到每一步都做了什么,如果我运行这个程序,它会在每一步都,进行显示,这能帮助我让我确信程序是,在以正确的方式递增。
So the way to think about this in terms of flow is, it starts with that if and it says, check both of those things.
因此用控制流的方式,来考虑这件事就是,程序由if开始,然后要对两件事情,都进行检查。
应用推荐