A community for students.

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

anonymous

  • 5 years ago

hi, in lecture 03 the tuple part, what did he change to make the tuple divisor script work?

  • This Question is Closed
  1. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    right, it's a comma after the i, ie (i,) anyone know why does there need to be a comma?

  2. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    there has to be a comma because it's a tuple assignment statement. For instance, when you assign a tuple initially, if you only want to put one value (say, 8) in it, you assign it t = 8, the way I think of it is that you're not trying to assign "the tuple" t the value 8. you're reassigning the tuple t to every element in it with the new element at the end. so if I'm using the tuple m, saying m+= 7, is like saying m = m[0],m[1],...7 the comma looks funny when you're only assigning one item, as in m = 7, but it's just a syntax rule that it has to be there.

  3. anonymous
    • 5 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    i understand now, thanks!

  4. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.