A community for students.
Here's the question you clicked on:
 0 viewing
 2 years ago
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
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

This Question is Open

SimpleSimon
 2 years ago
Best ResponseYou've already chosen the best response.0Sorry 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?

bookworm00981
 2 years ago
Best ResponseYou've already chosen the best response.1a break is necessary because it completes the code

SimpleSimon
 2 years ago
Best ResponseYou've already chosen the best response.0Thanks 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

MicroBot
 2 years ago
Best ResponseYou've already chosen the best response.2break just "kicks" you out of the loop.

SimpleSimon
 2 years ago
Best ResponseYou've already chosen the best response.0Once 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?

MicroBot
 2 years ago
Best ResponseYou've already chosen the best response.2yes but this looks like a typo you have.Dont know if it gives you errors. interstingStories.append(story) ##inter*e*stingStories xD

MicroBot
 2 years ago
Best ResponseYou've already chosen the best response.2and: 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

SimpleSimon
 2 years ago
Best ResponseYou've already chosen the best response.0Thanks Will try to give it a go
Ask your own question
Sign UpFind more explanations on OpenStudy
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
 Engagement 19 Mad Hatter
 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.