Hey guys I am really stuck in problem 5, and I really need help. In problem 3 when it says 'TitleTrigger fires' what does he really wants?
Do you have more of it... I do not remember them all by heart.
Problem set 5 in ocw.mit.edu programming science
Well, since there are several of those classes, some of which have more than one edition because they have more than one year, I'd need more than that.
It's 2011 by John gut tag
Problem 3. Implement a word trigger class, TitleTrigger that fires when a news item’s title contains a given word. The word should be an argument to the class’s constructor. This trigger should not be case-sensitive (it should treat “Intel” and “intel” as being equal). Each of the triggers listed there is "fired" when it matches something. They are saying they want a whole word trigger that works on the titles.
@e.mccormick thanks for your reply. But I think I have great problems with this "class" stuff. I don't understand them so well and I can't understand the necessity of using them in some cases. Actually it really messed my mind.
A class is a template, a way to do things. They are used in many languages for the creation of objects. Python is not really an objective language, but it does have objective aspects, so the use of the term class and object is loosly applied.
Join our real-time social learning platform and learn together with your friends!