• It is going to give me back a tuple a collection of two things, and so check out the syntax.

    它将给我返回一个数组或者系列的一对值,然后检查一下语法。

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

  • And I responded to at least one email about this issue, someone quite correctly said tuple are immutable, how can I change one?

    我在不止一封邮件里回复了这个问题,一些人很明智,知道元组不可变,但是疑问怎么能去改变他们,我的答案是?

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

  • And we're having a difference of opinion as to whether we should use a tuple or a list here, right?

    可以“是结果,明白了吗?我们队在这里是应该用数组,还是链表还有一些不同意见对吧?

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

  • In fact it gives me back, now I hate this, it's actually a list it's not a tuple. But for now think of it as giving you back an explicit version of that representation of all those elements.

    它实际上是一个数组而不是一个元组,但是现在你们可以把它认为,是明确的这些,元素的一个表示,你会在接下来的一些课程中看到。

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

  • Remember what range does, it gives me a set or a collection or a tuple of integers from 0 up to 1 - is the last value, so it's going to give me everything from 0 up to the total number of heads.

    我将要在这个循环范围内加上鸡的数量,记住循环范围的目的,它给了我一个从一开始的整数集合,或者数组,这是最后的值。

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

  • I can give two names, which will get bound to the two parts of that return tuple.

    我可以给它设两个变量,返回的一对值将会被赋给这两个变量。

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

  • And again I'm going to return either a three tuple there or a three tuple there.

    我会再次返回三个数组,要么在这儿要么在哪儿。

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

  • I did not want to make a list, I wanted to create a tuple thank you for catching it. I want parens not square brackets there.

    为什么这里有错误了,我并不想要创建,一个列表,我想创建一个元组,谢谢你,发现了这个错误。

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

  • STUDENT: So are you entering a tuple in for start and end?

    学生:那么你把开始点和结束点,访在一个元组里面输入么?

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

  • Now what I'd like to do, every time I find a divisor I'd like to gather it together. So I'm going to create a tuple of one element, the value of i.

    那么我就会去创建只包含一个元素的元组,也就是这个除数了,然后,啊,很好,这里是加法重载的一个很糟糕的应用。

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

  • In particular, I'm going to return a tuple.

    特别要注意,我要返回一个数组。

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

  • And I can obviously do the other direction which is I can say skip to index 2 and all the remaining pieces. This lets me slice out, if you like, the front part or back part or a middle part of the tuple as I go along.

    很明显我可以从索引2开始切片,所有剩下的元素,这可以让我2,如果你喜欢我这么说的话,取得元素的前面的或者后面的,或者中间的部分。

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

  • 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,这里,然后我会去运行,跟以前一样的循环,遍历这个集合内的东西,然后做检查,现在我要做的是,每次我找到了一个除数我要把它收集起来。

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

  • If it isn't, then I'm going to go back around the loop, and notice what happens. If I get all the way around the loop, that is, all the way through that FOR loop and I never find a path that takes me through here, then the last thing I'm going to do is return a pair or a tuple with a special simple number none twice.

    如果没有,我会回到循环看看发生了什么,如果我运行了整个循环,也就是整个for循环,我仍没有找到符合条件的路径,那么我最后做的事情就是返回一对,或者一个数组的两次none值。

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

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

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

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