Let me cluster them because really what I have, sorry, separate them out. I've gone from one problem size eight down to eight problems of size one.
让我把它们聚集起来,因为已经得到我想要的,抱歉,把它们分开来,现在我从一个长度为8的问题,得到了八个长度为1的问题。
Need to get the base in. Second thing I want to do, I need to get the height, so I'm going to input a value for the height, also as a float, a floating point.
也就是输入底的值,第二件我想要做的,事情就是得到三角形的高,因此我会输入一个值作为三角形的高,同样也是一个浮点数。
What you said was true, but I wanted something specifically about domination here.
你刚才说的是对的,但我想要得到与优势有关的回答
If I wanted to get full, real division, I should make one of them a float.
如果我想要得到真正的除法答案,我需要把他们之中的一个,变为浮点数类型。
If I want to get out right now the versions of these things, I can ask what's the value of c p 1 x, and it returns it back out.
你可以在那里看到那些,代表笛卡尔坐标点的东西,如果我想要得到现在,这个类的版本的东西的话。
Well let's see. My fall back is, I could just do linear search, walk down the list one at a time, just comparing those things. OK. So that's sort of my base. But what if I wanted, you know, how do I want to get to that sorted list? All right?
我只能做线性搜索了,一次遍历一遍列表,一个一个比较,但如果我想要,那怎样得到有序的列表呢?,现在的一个问题是,我们排序之前?
And of course I get out the value I'd like there.
当然我会从这里得到我想要的结果值。
So in some sets, as long as x has the value I want, it ought to do the right thing.
所以在某些结构中只要x的,只是我想要的我就能得到正确的结果。
It says if I want to get the length of a segment, going to pass in that instance, it says from that instance, get the start point, that's the thing I just found.
它的意思是如果我想要,得到一个线段的长度,首先要把这个实例传进来,然后对于这个实例,从开始点,取得x坐标,然后通过同样的操作。
And obviously, when I get to something whose square is equal to x, I've got the answer I want, and I kick it out.
大于x的时候,我已经经过了,想要的答案了,很明显,当我得到一个数的平方等于x的时候。
Because in doing that, Python would then have a value that it could pass on into some other part of a computation, and if it wasn't what I wanted, I might be a long ways downstream in the computation before I actually hit some result that makes no sense.
因为如果这样做的话,Python会将,输入的值传递到下面的,一些运算中去,如果这个值的类型不是我想要的,我可能会在得到,一个毫无意义的结果之前,经历一个很长时间的,计算过程。
应用推荐