I can't go down to the registrar and say, you know, I'd really like to do it at another time.
我不能去和登记的人说,我想要换个时间。
You divide and you find it's 9 and you say, "Okay, I know what to do with Newton's laws."
除一下,会得到 9,然后你说,"好了,我会用牛顿定律了"
Thing I've got a little procedure that could do that, but you know the simplest thing I could do is to say well, gee, wait a minute, why don't I just check to see if these are the same thing?
这两个点是同一个点么?,我已经写了一小块代码,可以提供这个功能,但是你知道的我可以做的,最简单的事情就是说好,嗯?,等等,我为什么不直接去看看,这两个东西相等不相等呢?
But if you say, well, I don't know how to do this, I am not going to bother, don't grade the paper.
但是如果你说,好吧,我不知道怎么做这个,我想麻烦,别给试卷评分。
What I want to do today is three things: I'm going to start-- actually, I shouldn't say start, I'm going to do a little bit of administrivia, the kinds of things you need to know about how we're going to run the course.
今天我要做三件事儿:,我要开始了--其实不应该说开始,我准备做一点儿文案工作,也就是关于怎么上课的,一些你们必须知道的东西。
Then, you've got to say, "What do I have to know about this object at the initial time?
然后,也许你会问,我需要知道物体初始状态的哪些信息呢
So you can actually say, how do I know which methods are associated with the class? For that, we can call dir. And what it does, is it gives me back a listing of all the things, dir all the methods, that are associated with it.
我们开始建立类了,我们得到了这些方法,因此实际上你可以说,我怎么知道,哪些方法是关联与这些类的?,为了解决这个问题,我们可以调用,这个方法的作用。
I wanted to show you that, so, first thing I'm going to do is say, all right, I know I'm going to need square root in here, so I'm going to, in fact, import math.
我们可以开始完成这个方法了,我想让你们看到完成这个方法的过程,第一件事情就是,我们在这儿需要一个求平方根的方法,实际上我将引入math包。
应用推荐