I can't count correctly, 1, 2, 3, 4, 5, 6, is he actually the center guy here?
我可能数错了,123456,他是这行最中间的那个人吗
But we might then wonder, for every person who gets less than the average amount of life-- suppose we take the median, take the amount of life that's exactly, 50 percent of the people get more, 50 percent of the people get less.
但是接着我们可能会想,对于所有活得比平均寿命要短的人-,假设我们取中间数,相对于平均寿命,刚好五成的人活得更长,五成的人活得更短。
And that idea was, we make a guess in the middle, we test it so this is kind of a guess and check, and if the answer was too big, then we knew that we should be looking over here. If it was too small, we knew we should be looking over here, and then we would repeat.
这些有理数是有序排列的,然后我们的想法是,首先在中间取个数作为猜想数,然后对这个猜想数进行验证,如果由猜想数得到的答案太大,我们知道应该跳过,比猜想数大的那个区间,如果太小的话。
-- Else if n is greater than 4 and n is less than 6 -- 7 let's call it medium -- else if n is greater than or equal to 7, -- less than or equal to 10 -- let's call it "big" -- and if the user typed in zero or negative 10 or 20 or whatever, let's just use the all-inclusive else block and just say, "You picked an invalid number."
否则如果n大于4,并且n小于-,我们叫它为中间数--否则如果n大于等于,小于等于10--我们叫它为“大数“,如果用户键入了0或者-10或20或其它的,让我们用一个广泛的else子句,只需要说,“你选了一个非法的数字“
应用推荐