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
MIT 6.00 Intro Computer Science (OCW)
Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
Not the answer you are looking for? Search for more explanations.
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
break just "kicks" you out of the loop.
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?
yes but this looks like a typo you have.Dont know if it gives you errors.
interstingStories.append(story) ##inter*e*stingStories xD
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.: