So what would I want to do? I'd like to somehow walk down each of the digits one at a time and add them up. Ah, that's a looping mechanism, right? I need to have some way of walking through them.
去取这个数的,每个数字然后把他们加起来,啊,这是个循环机制对不对?,我得找到一个遍历它们的方法,一种简单的方法可能。
It's going to take this list and add to it something else.
这个代码有什么作用呢?,我将会把一些东西加到这个数组里面去。
But all of you in this room probably remember what we technically call the base 10 system or decimal system because back in grade school or the like, you learned to count and add and subtract numbers by way of columns.
但是,在座的每一位可能都记得,这在小学的时候学的,以10为进制的系统或者十进制系统,通过数列方式学习数数和加减法。
They fill you with the faults they had and add some extra just for you.
他们将他们身上的毛病传给了你,还有灌输了许多其他的毛病
So we can do this for any final charge we have, if we have a molecule that has a charge of plus 2, then all of the formal charges should add up to plus 2 and so on.
对于任意净电荷的情况,我们都可以这样做,比如假设我们有一个带两个正电荷的分子,那么所有的形式电荷加起来应该等于正二,等等。
And really constantly considering the story and what new twists and elements we need to add to the story are a pretty big deal for us as well.
不断反思这个故事,反思我们需要加进去的新情节和新元素,对我们来说也很重要。
But remember, the libertarian theory says we can't just add up an aggregate preferences and satisfactions that way.
但是记住,自由主义理论说,我们不能那样,简单加总偏好和满足。
And, one thing I'd like to add to it, and that is, and I told this to my recitation sections that when you do these quizzes, in spite of the fact that it might be trivial in some cases, make sure you carry the units through.
而我要在这基础上再加一条,我在我的背诵课上也讲过,当你考试时,尽管单位不重要,但我希望你能注意它们。
And the first law says, well heat and work are different forms of energy, and we can add them, and the path dependence of these two things is somehow cancelled in the fact that we have this internal energy.
热力学第一定律说,热和功是能量的不同表现形式,我们可以把它们加起来,它们与路径相关的部分相互抵消,我们就有了内能。
And then finally we could add that--the idea that maybe with a lot of electronic basses and things like that that they play--they tend to play the bass just louder.
然后最后我们可以添加这个,一种很多电贝斯和其他同类乐器演奏的方式,倾向于将低音演奏得响亮一些。
So, we add all of that up and that's residential investment.
这三种支出归入住宅投资
All right? And if you want to do other things, whoops, sorry-- and add them together, we will get out, again, a concatenation of that string. And these will, we'll let you work through the variations, but these are the simple expressions we can use.
对不对?如果你想要进行一些别的操作,哦,对不起-是加到一块,然后结果值也是,两个字符串的链接,这些会,我们会让大家慢慢学习变量,但是这些是我们能用的最简单的表达式。
It says find the midpoint, which says, last take the start, which is pointing to that place and add it to start. And that basically, somewhere about here, gives me the midpoint.
先找到中点,从起点开始,指向这个位置,用first减去,加上得到偏移量),大概在这里,我们找到了终点。
That means starting at the first one, I'm going to do something to it. And what am I'm going to do? I'm going to take that character, convert it back into an integer, and add it into some digits. And I've done a little short hand here, which is I should have said some digits is equal to some digits plus this.
这意味着从第一个字符开始,我要对他们进行一些操作,我要去做什么呢?我要取得这个字符,然后把它转换为整数,然后加到某些数上面去,我在这里用了一些缩写,我本来应该写一个数字等于这个数字。
first So what do I do? I find the midpoint by taking last minus first, divide by 2, and add to start.
要怎么做?我把last减去,除以二,加到起点上去。
And here, I'm going to suggest we've seen numbers, we've seen strings, and I'm going to add Booleans here as well.
我要提醒下大家我们学习过数字数据了,学习过字符串了,今天还要学习布尔类型,这是当我们谈到条件的时候。
应用推荐