• For his mathematical project, he compared two ways to estimate the square root of an integer, a number with no fractional parts.

    VOA: special.2011.03.24

  • You've got a picture of somebody's face, it's a million pixels. Each pixel has a range of values from zero to 256. I want to hash a face with some function into an integer.

    你有一个人的脸部照片,它有一百万个像素,每个像素的值范围在0到256之间,我想用某个函数将一张脸部照片。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • There's no decimal point; there's no point zero; there's no floating point value, it's just a hardcoded integer.

    这里没有小数点,这里没有;,这里没有浮点数值,它只是一个整型数字。

    哈佛公开课 - 计算机科学课程节选

  • Let me generalize this. In this case, my incrementer was just adding 1 to an integer, it's a pretty straightforward thing to do.

    当我完成后,我不会再显示任何信息了,好,好,那么你们已经看过两个简单的例子了,让我来讲讲概念,在这个例子中。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So at the very top, I've coded up the same thing as before: "Give me an integer between one and ten," or rather, -- "give me an integer between one and ten" -- a little different this time.

    所以在顶部,我像之前那样对同样的东西进行编码:,“给我一个1到10的整数“,或者,“给我一个1到10的整数“,这次有点不同。

    哈佛公开课 - 计算机科学课程节选

  • I'd like an integer please, a colon, and a space just for aesthetic reasons.

    我想要一个整型数,一个冒号,和一个,使其更美观的空格。

    哈佛公开课 - 计算机科学课程节选

  • I'm going to write a function to compute integer power exponents.

    我要去写一个,计算一个整数幂指数的方法。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • > Okay. Well, this code allocates a new integer pointee and this part sets x to point to it.

    >,好的,呃,这段代码分配一个新的整型指针数据,这部分让x指向它。

    哈佛公开课 - 计算机科学课程节选

  • So hopefully there is indeed a way to fix this, but it looks as though the division operator, the single slash is division but -- and here's a curiosity about many programming languages -- because 17 is an integer and because 13 is an integer, why do I say that?

    我的确希望有一个方法来修正这个错误,但是看起来,好像那个除法操作,那个斜杠是除法,但是--对于很多编程语言来说,是挺奇怪的--因为17是一个整数,13也是一个整数,为什么我这样说?

    哈佛公开课 - 计算机科学课程节选

  • I'm given an integer that's a perfect square, and I want to write a little piece of code that's going to find the square root of it. All right so I'm cheating a little, I know it's a perfect square, somebody's given it to me, we'll come back in a second to generalizing it, so what would the steps be that I'd use to walk through it?

    完美平方数的整数,我想写一段代码来求这个数的平方根,好,我这儿有点儿作弊了,我知道这是一个完美的平方数了,他们给我的,我们后面会讲怎么产生这个数的,那么我想解决这个问题,需要什么步骤呢?

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • I print out -- and this is only wrapping - because of the big font -- I print out, "I demand that you give me a positive integer."

    我打印出来--这个字符相互覆盖了,因为用的是大字体-,我打印:“我需要你给我一个正整数“

    哈佛公开课 - 计算机科学课程节选

  • I demand that you give me a positive integer.

    我要求你给我一个正整数。

    哈佛公开课 - 计算机科学课程节选

  • 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.

    这意味着从第一个字符开始,我要对他们进行一些操作,我要去做什么呢?我要取得这个字符,然后把它转换为整数,然后加到某些数上面去,我在这里用了一些缩写,我本来应该写一个数字等于这个数字。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So, for example: in this case, my list is a bunch of integers. And one of the things I could take advantage of, is I'm only going to need a finite amount of space to represent an integer.

    列表是一系列整数,要注意的这里的优势能够,用有限的空间来表示整数,例如,如果我想要操作。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So this declares an integer, a variable of type int called I, 0 and initializes it to zero.

    所以这里声明了一个整型数,一个叫做I的整型变量,把它初始化为。

    哈佛公开课 - 计算机科学课程节选

  • So this is something that we would call an integer, or an INT. And this is something we would call a floating point, or a float.

    这是我们称之为integer的类型,或者INT,这是我们,称为浮点数的类型,或者浮点。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • Go ahead and implement with the person next to you a program that takes as input from the user an integer called F and prints out the answer of the Celsius equivalent.

    继续和你旁边的人执行程序,取来自用户的整数F作为输入,然后打印出与之等价的摄氏温度的答案。

    哈佛公开课 - 计算机科学课程节选

  • As a consequence, I have a list of ints.

    是由integer类型组成的数组。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • So int is gonna stand for integer, it's just a number.

    大家都知道int代表整数类型,一个数字而已。

    哈佛公开课 - 计算机科学课程节选

  • a to the b where b is an integer.

    也就是a的b次方,而b是个正整数。

    麻省理工公开课 - 计算机科学及编程导论课程节选

  • b OK. In this example I'd use b. All right, as b get-- b is the thing that's changing as I go along here, but it could be things like, how many elements are there in a list if the input is a list, could be how many digits are there in a string if the input's a string, it could be the size of the integer as we go along. All right.?

    好,在这个例子里我会用,因为b是一直在变的东西,但是也可能是如下情况:,如果输入是数组的话,变化的就是数组的元素数,如果输入是字符串的话,变化的就是字符串的长度,如果是integer的话,可能就是这个数的大小,对不对?

    麻省理工公开课 - 计算机科学及编程导论课程节选

$firstVoiceSent
- 来自原声例句
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定
小调查
请问您想要如何调整此模块?

感谢您的反馈,我们会尽快进行适当修改!
进来说说原因吧 确定