0

I have been trying hard to get my mistakes for this PSET but can't find what errors have I made in implementing analyzer.py and tweets.On running ./smile word be it love, hate, Stanford I get :| in yellow which means my implentation of analyzer.py is wrong. And on running ./tweets @screen_name be it @katyperry or @cs50 or @davidjmalan I get the same result 0 hello, @world in yellow.

Any suggestions will be appreciated!

1 Answer 1

1

This syntax if word.lower() in self.positives == True: is the problem. Use if word.lower() in self.positives (without the equality). I don't remember the exact evaluation/operator precedence rules that apply.

2
  • Thanks for help it works perfect now.
    – sk.76
    Commented Jul 14, 2017 at 15:41
  • Code removed for academic honesty.
    – sk.76
    Commented Jul 14, 2017 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .