But odds are it's not sufficient just to get it from the user, I, the human need to be handed whatever this function got from the user in some form.
如果只是从用户,我这里获取,好像有点不太准确,我们得交出,该函数从用户那里得到的一切信息。
to do sqrt, or square root-- no, I'm going to square root use sqrt, that's the name I'm using here-- square root a hundred different places in some piece of code. Without function, I'd have to copy that piece of code everywhere.
让我做一下准备,想象一下我要调用sqrt或者-,不,我会调用sqrt函数,这是我在这里用的名字,我得把这段代码到处复制。
It's very clear I've got to start with a function that looks like t^.
显然,我得从一个类似与t^的函数开始
Find the best response function by differentiating this and maximizing the function for every q2, so we could just... Good, so what we're going to do is, all right good, we're going to... We're trying to maximize.
求导得出q2取最大值的情况下,参与人1最佳对策是q2的一个函数,说得很好,接下来,我们要求出最大值
First of all, two parameters. It's OK. All it says is, when I call this, I need to pass in two parameters for this to work. All right? Now, if I want to use that, I'm going to use a second piece of code here, called Barnyard. I'm going Barnyard to read in a couple of values, convert them into integers, and then I'm going to use solve to get a solution out.
注意我得到了什么,第一,两个参数,它的意思就是我调用这个函数,我得给它输入两个参数,明白了吗?,现在如果我要使用它我得用,这里的第二段代码,也叫,我将读入一组值,将它们转化为整型,然后我会用solve得到一个解决方案。
应用推荐