"Fertilizers represent about 20 percent of the input costs in rice production for farmers."
VOA: standard.2010.07.28
So in general, when you're running command line programs, they can take input or arguments or parameters or switches or flags.
一般而言,当你运行命令行程序时,可以把把这些当做输入,像什么参数啊,或开关啊,或标志啊等等。
It was a complete waste of time, unless the goal in life was simply to pester the user for some input.
刚才的时间就完全浪费了,除非那个唯一的目的,是简单地纠缠用户索要一些输入。
"In terms of diplomacy and conflict resolution, he did say that resolving the Israeli-Palestinian issue was a major input, and he immediately named Senator George Mitchell as his envoy in order to work on that particular issue,"
VOA: standard.2009.04.24
The second thing is, what do I print out if I actually don't get the right input in?
第二件事是我没得到,正确类型的输入时输出什么?
So, this is what goes on in an electrolysis cell, and it works thanks to input energy from a power supply shown here.
所以,这是在一个电化学电池中发生的,它是靠输入的能量工作的,从和这个类似的电源输出的能量。
Even though my statement said enter a number, in particular, raw input here simply takes in a set of characters and treats it as a string.
即使我的陈述说的是应该输入一个数字,实际上,这里的原始输入会被当做一个字符,的集合来提取并被当做一个字符串来对待。
ReadFloat We'll look at it in a second. Let me sort of set the stage up for this -- suppose I want to input -- I'm sorry I want you as a user to input a floating point number.
名字叫,我们来看一会,我先来设置下情景-,假设我想输入,抱歉,我希望你们作为用户来输入一个浮点数。
We're going to build up this taxonomy if you like, but the reason it's relevant is, associated with each one of those types is a set of operators that expect certain types of input in order to do their job.
我们将会建立这种分类,但是这相关的原因是,对于每种类型都有,和之对应的一个操作集,这个操作机对一些输入,做出规定的操作。
Now in this case, it's clear that I'm not only saying this function takes an input, I also have to give that input a name.
在这种情况,很清楚的,我不只是说明这个函数有一个输入,我还要给那个输入一个名字。
Notice in this program I have not checked whether or not the user actually provided input.
就拿这个程序说事吧,我们根本没有检查,用户到底有没有输入。
Because if I don't specify a name for this input, I have no way of actually referring to it in subsequent lines of code.
因为如果我不给这个输入定义一个名字,在随后的代码中,我就没有办法使用它。
You have to pass it as input to another function, as you'll see as possible in problem's Set One specification, but it's ultimately up to you.
你需要把它传给另一个函数当入参,就像你们将,在习题集1中可能看到的,但它最终取决于你。
We've been using strings thus far to get input from user and store it in variables.
迄今为止,我们用字符串来接受用户的输入,然后存储在变量里。
I need a contract that says, here's what I want in terms of things that you're going to take as input, to begin your part of the drama, here's what you're going to produce at the output, and the details of what they do inside are up to them.
这些作家相互沟通进行工作呢?,我需要一封规格说明书,我需要一份合约,上面列出了我想要你做的事,这些是你要再开始时做的输入,这些是你要的输出,细节工作就取决于它们了。
And its purpose in life is to maybe take input and maybe produce output.
它的唯一目的是可能是获得输入,可能是输出东西。
I'm going to run through a loop, and I'm going to request some input, which I'm going to read in with raw input.
我要运行一个循环,我需要一些输入,需要读入一些原始的输入。
Suppose instead, I want a machine that can take a recipe, the description of a sequence of steps, take that as its input, and then that machine will now act like what is described in that recipe.
假设换成这个,我想要一台可以安装描述,一系列步骤的结果的方法的机器,把那个当做输入设备,然后那台机器可以像方法中,描述的那样运行了。
That in many cases, I can gain efficiency if I'm willing to give up space. Having said that though, there may still be a problem, or there ought to be a problem that may be bugging you slightly, which is how do I guarantee that my hash function takes any input into exactly one spot in the storage space?
普遍存在的增益和权衡,在许多的例子中,可以通过牺牲空间而得到效率方面的增加,话说回来,仍然存在一个问题,或者应该会有一个问题困扰着你,就是我如何保证我的哈希函数能够准确将,任一输入映射到相应的唯一的存贮空间中去?
No, instead we have to click other amount at bottom right there, when we have to input 4-0-0 in this screen 4-0-0 after consulting visually the little cheat sheet on the device itself it tells you in a very long chart how much one pass costs so we multiply and type in 4-0-0, we hit enter.
不,然而我们必须点击,右下边的这个,当我们需要在这个屏幕上,输入0,通过咨询那个设备上小说明,它在一个很长的图表上,告诉你,每一站需要多少钱,我们加起来,输入了4-0-0,点击输入。
So, summarizing better, assert is something you put in to say to the user, make sure you're giving me input of this type, but I'm going to guarantee you the rest of the code works correctly. Exceptions and exception handlers are saying, here are the odd cases that I might see and here's what I'd like to do in those cases in order to try and be able to deal with them.
所以更好的总结下,断言就是你放在那里告诉用户,保证你输入的是这种类型的,但我能保证剩下的代码运行正确,异常和异常处理做的事,这里有些我能预期的异常情况,并且这里有些情况,我能尝试处理。
So STR, which I just typed up there, takes in parens, some input, and it converts it into a string, so that now I can use that John where I was expecting a string. John.
因此STR,也就是,我刚刚输入的,然后把这个输入变更为一个字符串,因此现在我就能,在需要用字符串的地方使用这个对象了。
In just a couple of weeks can you start implementing things that take input from users; and if you really want to push yourselves with that particular week can you implement what we dub God mode.
几个星期之内,你就能开始执行从用户端的输入,你需要发奋苦学才能在同一个星期,实现我们的称之为God的模式。
So before we use printf, a function, and we passed in one input and input henceforth we're gonna call arguments or parameters.
我们在使用printf函数时,先放进去一个输入,之后的输入我们就要,调用参数了。
I'm going to have it take in as input how many legs I got, how many heads do I have, and I just want to write a little loop.
这就是解决问题的思路,我将要输入我有多少条腿,以及我有多少只头。
That's the question we're going to try and address. If we can do this, this is good, because first of all, it removes any questions about what machine I'm running on, it's talking about fundamentally, how hard is this problem, and the second thing is, it is going to do it specifically in terms of the input. Which is one of the things that I was worried about.
这是一个我们接下来要去,尝试和解决的问题,如果我们能做到的话会很不错,因为首先,它解决了结果可能和我,运行的计算机有关系的问题,因为这从根本了告诉了,我们这个问题的复杂度,第二件事情,就是这种方法可以依据输入的大小来计算,而这正是我最担心的地方。
I'm doing a little trick by the way, I'm using raw input in my function here as a just a way to stop the display.
顺便说下在这儿我有个小恶作剧,在这个函数中,我使用了raw,input方法。
But if it does take input, you have to provide it in the form of arguments or parameters, like print F takes, generally, inside of those parentheses.
但是如果它获得了输入,你需要为它提供相应格式的,参数或参量,像printf的输入,一般地,在这些圆括号里。
I have a sequence of commands; I've got an assignment statement, I've got another assignment statement, I've got a print statement, I've got an input statement, which we'll come back to in a second.
这是一系列的命令;,我有了一个赋值声明,然后是另外一个赋值声明,还有一个print声明,然后是一个input声明,我们稍后会讲讲这个生命。
I'm passing as input the value in X, which is two.
我把那个值当输入传给X,那个值是。
应用推荐