• Each of China's provinces, autonomous regions and special administrative regions contributed a float.

    VOA: standard.2009.10.01

  • And as you might expect, I'm going to then try and see if I can convert that into a float.

    正如你希望的我要试着把他们转化为浮点数,等一等。

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

  • Last time we checked the type and said if it is a float you're okay. If not, carry on.

    并且会告之是否是一个浮点数,如果不是继续循环。

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

  • The concrete and glass museum is built next to a body of water, so it almost seems to float.

    VOA: special.2011.04.13

  • So what that means is the compiler is actually going to first "cast" so to speak 13 from whatever it is - to a float -- to a floating point value -- and then perform the division for us.

    所以这里的意思是编译器将,做“计算“,譬如13这样一个浮点数,-到另一个浮点数-,然后为我们处理除法。

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

  • Sue told him about Johnsy and how she feared that her friend would float away like a leaf.

    VOA: special.2009.08.01

  • OK, says it says enter a float. I give it something that can be converted into a float, it says fine. I'm going to go back and run it again though. If I run it again, it says enter a float.

    好了,看到他说输入一个浮点数,我输入它可以转换为浮点数的值,那没问题,我回过来再运行一遍,如果我再运行一遍。

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

  • From a distance, it appears to float on a lake.

    VOA: special.2009.12.13

  • I can't rely on the user. I want to make sure I get a float in it, so how do I do that?

    我想确保这儿我得到的是一个浮点数,我该怎么做呢?

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

  • The float celebrates the legacy of the Tuskegee Airmen, a World War II unit of African-American pilots.

    VOA: standard.2009.12.30

  • Then I'd be multiplying a float by 5, so that's a float times an int.

    然后我们把这个浮点数乘以,那是浮点数乘以整型数。

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

  • But if I say turn this into a float, ah it throws a value error exception.

    它就会抛出一个值错误异常了,它会告诉我输入了一种错误的值。

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

  • When you think about an int or a float or a dictionary or a list, you knew that there were functions that operated on them.

    当你想到整型,浮点型,或者链表时,你知道可以用函数去处理他们,但是当你传递一个参数,例如链表。

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

  • - And then I divide by an int -- that's okay because so long as you have a float involved at some point early on, you're okay.

    然后我除以一个整型数-,那是可以的因为现在为止,我们在之前已经,引入了一个浮点数,你是对的。

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

  • I need to have a float. I need to have another float here, it's giving me some information.

    这儿还需要一个,它给了我这样的信息。

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

  • Need to get the base in. Second thing I want to do, I need to get the height, so I'm going to input a value for the height, also as a float, a floating point.

    也就是输入底的值,第二件我想要做的,事情就是得到三角形的高,因此我会输入一个值作为三角形的高,同样也是一个浮点数。

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

  • If I wanted to get full, real division, I should make one of them a float.

    如果我想要得到真正的除法答案,我需要把他们之中的一个,变为浮点数类型。

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

  • Well I'm relying on the contract, if you like, that the manufacturer of square root put together, which is, if I know I'm giving it two floats, which I do because I make sure they're floats, the contract, if you like, of square root says I'll give you back a float.

    好吧我能靠一些类似合约来保证,如果这么说你喜欢的话,其实就是当求平方根的方法,获得了两个我已经确认了是浮点数的数后,这个类似合约的东西就会保证,返回一个浮点数。

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

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

    如果我想要解决这个问题,这就是我要解决它的方式了,第一件我要做的事情就是要,输入一个浮点数作为三角形的底。

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

  • How do I know I've got a float in hyp?

    我该怎么确保这一点呢?

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

  • I say, "Get me a float."

    我说:“给我一个浮点数“

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

  • That's going to give me a float.

    那将会给我们一个浮点数。

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

  • Is this a real or a float?

    看看到底是个实数还是个浮点数?

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

  • So yes, f is a float, but that solution is too late; we need to fix the problem sooner.

    是的,f是一个浮点数,但是那个解决方案太迟了;,我们应该在次之前把问题解决。

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

  • If we did that, if we moved f minus 32 over to the left, that would give me a floating point answer because f is a float.

    如果你那样做,如果我们把,放前面,那将会给我们一个浮点数答案,因为f是浮点数。

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

  • And again, if I just run this, just to show that it's going to do the right thing, it says enter base, I'm obnoxious, it says oops, wasn't a float, so we'll be nice about it and I enter a height, and it prints out what I expected. I just concatenated those strings together, by the way, at the end.

    我再来运行下看是不是做对了,提示输入底,噢,它提示说不是浮点数,我很高兴,然后我输入一个,浮点数作为高度显示结果和我预期的相同,顺便说一句,我只是在最后把这些字符串连接起来了。

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

  • So it turns out there's a solution to this: If you need more precision, more digits after the decimal point than a float allows, what do you go for instead?

    所以这里有一个解决方案:,如果你需要比float类型允许的更高精度,小数点后更多位数,那你该用什么取代它?

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

  • > David: At some point in time, I'm going to have to have declared the variable as a float before I can then hand it to printf as the insertion value for that format strength.

    >,大卫:在一个特定的时间,我将需要,声明float类型这样的变量,那样我就可以把它打印出来,像是格式化优点的插入值。

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

  • I can't rely on Professor Guttag if I give this- if this code to him, I can't rely on him to type in a float. Actually I can, because he's a smart guy, but in general, I can't rely on the user-- I wouldn't do it right to see if you did.

    当Guttag使用这段代码的时候-,我不能相信他一定会输入一个浮点数,实际上我能因为他很聪明,但是总体上来讲,别相信用户一定会按照规则来-,我会故意做错来试试你的程序的。

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

  • 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,这是我们,称为浮点数的类型,或者浮点。

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

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

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

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