Quantcast

Got Homework?

Connect with other students for help. It's a free community.

  • across
    MIT Grad Student
    Online now
  • laura*
    Helped 1,000 students
    Online now
  • Hero
    College Math Guru
    Online now

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

SimpleSimon Group Title

PS5 Part 3 Filtering My code was the same as Problem set solution except I did not put in break Not why break is necessary? I will post code

  • 2 years ago
  • 2 years ago

  • This Question is Open
  1. SimpleSimon Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    code attached

    • 2 years ago
    1 Attachment
  2. SimpleSimon Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Sorry Q should have read: PS5 Part 3 Filtering My code was the same as Problem set solution except I did not put in break Not sure why break is necessary?

    • 2 years ago
  3. bookworm00981 Group Title
    Best Response
    You've already chosen the best response.
    Medals 1

    a break is necessary because it completes the code

    • 2 years ago
  4. SimpleSimon Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanks bookworm What would happen without break? Intuitively I would want this loop to keep going adding more stories to interesting stories I have not used break in any of my programs so far so struggling with concept

    • 2 years ago
  5. MicroBot Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    break just "kicks" you out of the loop.

    • 2 years ago
  6. SimpleSimon Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Once again Thanks MicroBot So for each story once a trigger is found it adds story to interesting story list and moves on to next story So it does not look for further triggers in story that would (if found) add repeated stories to Interesting story list. Am I correct?

    • 2 years ago
  7. MicroBot Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    yes but this looks like a typo you have.Dont know if it gives you errors. interstingStories.append(story) ##inter*e*stingStories xD

    • 2 years ago
  8. MicroBot Group Title
    Best Response
    You've already chosen the best response.
    Medals 2

    and: return interestingstories ### return interesting*S*tories btw use this site to paste you codes as its easier to see it without having to download any files and open python and and and.: http://pastebin.com

    • 2 years ago
  9. SimpleSimon Group Title
    Best Response
    You've already chosen the best response.
    Medals 0

    Thanks Will try to give it a go

    • 2 years ago
    • Attachments:

See more questions >>>

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.