are all functions of state and parameters that we can control like temperature and pressure.
公式里面的全部都是态函数,我们控制态函数的参数比如温度或者压强。
All right. How do we go about choosing these parameters?
好了,我们怎样选择这些参数呢?
pV=RT p plus a over v bar squared times v bar minus b equals r t. All right if you take a equal to zero, these are the two parameters, a and b. If you take those two equal to zero you have p v is equal to r t.
我们就回到,也就是理想气体,状态方程,下面我们来看看,这个方程。
Inside of solve, solve creates an environment where inside of that, it has bindings for the parameters it's going to use. All right?
在solve内部,solve创建了一个环境,在这个环境中它给她要使用的形参赋了值,明白吗?就像很多--等等?
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得到一个解决方案。
应用推荐