These things run for variable amounts of time because they take input, a list of size of some amount.
而这一段的执行时间是可变的,因为它们需要输入一个包含一些元素的列表。
It's a common mistake to make if you forget that I've actually declared that variable up top, but wait a minute, I know any time that I use a variable, I have to declare it.
这是一个通常犯的错误,如果你忘了,之前在前面已经声明了这个变量,等等,我知道在任何时候,我使用一个变量,我必须声明它。
But it's variable because it doesn't always go off on the thousandth time.
但中奖比率是变化的,因为你并不总在拉杆一千次的时候中大奖。
And then I run a loop in which I read something in, I check to see if it's the right type, if it is, I change that variable to say it's now the correct type, which means the next time through the loop, I'm going to say I'm all set and I'm going to bounce out.
因为我还没输入,然后我运行一个循环,循环内部我输入一些东西,然后看看是不是正确的类型,如果是的话我改变input,Ok为真,来证明输入数是正确的类型,这就意味着下一次运行这个循环的时候,就可以跳出循环继续执行了。
I can just whip out a variable, this time it's gonna be dynamically stored there.
我们可以临时分配一个变量,将这个值暂时存放在这个变量中。
And fixed versus variable speaks to whether you give a reward on a fixed schedule, every fifth time, or variable, sometimes on the third time, sometimes on the seventh time, and so on.
固定与变化则是相对于,你是否根据固定时程给予奖励而言的,每五次就给予奖励,或者是变化的,有时候在第三次上给予奖励,有时候则在第七次上给予奖励。
> David: At some point in time, I'm going to have to have declared the variable as a float before I can then hand it to printf as the insertion value for that format strength.
>,大卫:在一个特定的时间,我将需要,声明float类型这样的变量,那样我就可以把它打印出来,像是格式化优点的插入值。
应用推荐