Situation number two is I take the same number, and I make a row. They are all in one row.
状态二我将采用同样的数字,并且我做了一个箭头,它们全部都在一列上。
and then one day I'll be like, "Oh, I want to dress like a clown today, so I will."
而可能有时候,我想,“喔,今天我想打扮成一个小丑,然后我就这么做了。”
One of the advantages of this is, that I don't have to worry about explicitly updating my variable. That happens for me automatically.
这样继续下去,这样做的一个优点是,我不用为更新变量来发愁了,程序会自动的为我进行这个操作,这一点很好。
The distinction I made in the paper that we talked about in the class is between procedural justice and substance of justice in the university.
我曾经在一篇论文中做了一个区分,在课堂上讲到过,那就是大学程序性公正,和实质性公正的区别。
I wanted to show an example with real data that I computed and that's what's up on the screen.
我用真实的数据做了一个案例,请看上方的屏幕。
And right off the bat you notice that I am making a huge assumption here.
在你交卷的时候,你正好注意到我在这里做了一个重要的假设。
One experiment a post doc of mine did was he took these cells and injected them back in to the ear into the otic vesicle at the stage where we think the cells are in development.
我的一位博士后做了一个实验,他提取出这些细胞,然后注射到,处于发育阶段的,耳部泡囊中。
We're actually making a legitimate copy with this version of the program so I don't have this bug in anymore.
我们使用这个程序版本,做了一个合法的拷贝,这样我就没有这个bug了。
Sometimes it's just a sandwich if I'm tired.
有时如果我累了,就只做一个三明治。
than be an academic or a professor." And so I did my degree in education and now here I am at TIA.
也不愿意做一个学者或教授。”所以我取得了教育学学位,现在在TIA。
And you get the idea. What am I going to do next? I'm going to compare three against four.
我接下来将要怎么做了?,我要拿3和4进行对比,3是小的一个。
All right, c p 1 dot y, x I've said assign that to the value 2, 2,0. So now c p 1 has inside of it an x and y value.
一个特定的版本,我现在命名了一个内置变量,并给它赋值了,我刚刚做的也就是给它。
Is this something you always grow up saying, "I wanna be a philosopher when I grow up."
您小的时候是不是常常说,“等我长大了,我要做一个哲学家“
The other thing I have down is population, although the population of the U.S. has been pretty steady -that pink line looks awfully steady -and I have interest rates.
我还做了另外一个数据,就是人口数,而美国的人口数量一直都很平稳,粉色的那条线看起来非常平稳,我还做了利率的数据
I want-- I know I'm running you slightly over, I want to do one last example, it's, I also want to be able to do, have variables to store things.
我想-我知道讲的有点多了,我想给大家看最后一个例子,这里我想做的是,通过变量来存储东西。
I was just yesterday-- I gave a talk in Montreal at the Caisse de Dep?t,et Placement du Quebec, which is the big wealth management fund for the Province of Quebec.
昨天,我刚在蒙特利的魁北克储蓄投资集团,做了一个讲演,这个投资集团是魁北克省的,一所大型财产管理基金机构。
Say, Binky, I don't think dereferencing y is a good idea because, you know, setting up the pointee is a separate step and I don't think we ever did it.
你说,Binky,我不认为不关联y是一个好主意,因为,你懂的,调定指针数据是一个单独的步骤,我不认为我们这样做了。
This says, I need a second argument to it, and that second argument better be a point so I can do the comparison.
这里我需要第二个参数,第二个参数最好是一个点,这样我就能做比较了。
These are instances of a class, and associated with that class are a set of methods things that I can deal with.
但是Python的基本思想是相同的,这是一些一个类的实例,这个类关联了一个方法集,我可以做的一些操作。
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 by just doing that, bug I just spotted, there's a bug here.
我刚刚这么做了,就发现了有一个。
I think the easiest way to look at what this does, is let's take a really simple example- I want to make sure I put the right things out- I've got a simple little list of values there.
到底做了什么,就是让它跑一个简单的例子,我想要确信我找到了正确的元素-,这里我用一个简单的小的列表-,如果我去代码里面看。
same point Cartesian to have 1 representation for a point that supports different ways of getting information out, but has gathered within it, a method or a function for dealing with things like how do I know if it's the same point or not.
还有,这是一个比较极坐标的点,是否相同的不同的方法,但是这开始成了一个麻烦事儿了,我真正想要做的事情是,创建一个能支持不同的方式,输出已经收集的信息的点的表示。
So if I were to solve this problem, here's the way I would do it. I would say, first thing I want to do, is I want to input a value for the base as a float.
如果我想要解决这个问题,这就是我要解决它的方式了,第一件我要做的事情就是要,输入一个浮点数作为三角形的底。
Notice I've made one change.
请注意我做了一个改变。
And that shows you one other nice little thing we want to do, which is if I look in this code notice I set up a variable up here called false Solution Found, initially bound to false.
这显示了我们想要做的另一件事,那就是我在这段代码中设置了一个,名为Solution,Found的变量,初始值设为。
I'm going to give a name to that. And what you see there is I'm going to call divisors initially an empty tuple, something has nothing in it. Right here. And then I'm going to run through the same loop as before, going through this set of things, doing the check.
你们可以看到这里,我初始化一个空的元组,名为divisiors,这里,然后我会去运行,跟以前一样的循环,遍历这个集合内的东西,然后做检查,现在我要做的是,每次我找到了一个除数我要把它收集起来。
应用推荐