We got an easy one. Let's just for the heck of it I should have found some better examples before I tried this. No mutant spiders here.
我们有了个简单的数字,让我们以防万一,我应该在尝试这个之前找几个更好的例子。
But notice now, those aren't just simple things like numbers, those are actually points.
但是现在请注意,这并不是像数字一样,的简单类型了。
But you don't know that there is an easy one for you down at number four 4 if you haven't bothered to look at number four.
但是你不知道,在数字4的时候会有一个简单的题目,如果你没有尝试去看数字。
And it boils down to modifying the format string with just a simple number.
它归结于是用一个简单的数字来,修改字符串的格式。
That's what I'm going to emphasize, more than just plugging in the numbers.
所以我一直强调,它不仅仅是代数字这么简单
You know, you can do the simple numbers, right?
你知道那种简单数字的运算的,对不对?
Cannot we get simple numbers like three and seven?
我们能不能得到简单的数字比如三和七?
So we've looked at how to solve square root we've, looked at two problems, I've tried to instill in you this sense of paranoia which is so valuable, and now we're going to pull back Python and return to something much simpler than numbers, and that's Python. All right?
我们已经研究了如何去求平方根,研究了两种方法,我一直在尝试着给你们逐渐灌输,要偏执的理念,这样的理念非常有价值,现在我们回过头来去学习一些,比数字更简单的东西,也就是,对不对?数学问题很难?
Basic idea, before I even look at the code, is pretty simple. If I've got a list that is sorted, in let's call it, just in increasing order, and I haven't said what's in the list, could be numbers, could be other things, for now, we're going to just assume they're integers.
我们可以说基本的思想是很简单的,如果我有一个排好序的数组,让我们认为这个数组是递增的吧,我并没说数组里元素是什么,可能是数字,也可能是其他的东西,现在我们假设是integer类型的数字吧,最简单的方式就是这么做了:
应用推荐