Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 19 Online
OpenStudy (anonymous):

More on classes from pset 5, problems 3-5: dpaste.com/773915/ why, on line 26-28, do you have the 'story' as an argument instead of just having 'title' directly? And why the 'self' on the same lines? doesn't is_word_in only take one argument? (see 6-18 above)? thanks!

OpenStudy (anonymous):

to question 1: is it somehow because of polymorphism? (sorry, all of these concepts are so new and i'm trying to figure out how they fit together..)

OpenStudy (anonymous):

the evaluate method is supposed to take a NewsStory object as its argument? "... evaluate method that takes a news item (NewsStory object) as an input ..." self is kinda like a reference iguess, it tells the interpreter which variable to be using,,, i think that's the case anyway http://effbot.org/pyfaq/why-must-self-be-used-explicitly-in-method-definitions-and-calls.htm

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!