What if we have the same frequency score on both a positive and a negative tweet

what if we have the same frequency score on both a positive and a negative tweet. for example,
positive: I am happy, not sad
negative: I am sad, not happy

will it be positive, negative or neutral? it’s a little confusing, can anyone get me out of this issue?

What you are pointing out is a fundamental limitation of the Naive Bayes method. Prof Younes mentions this in one of the later lectures in Week 2: it’s easy (as you demonstrated) to change the sentiment by simply rearranging the words. Basically they are showing you some “classical” methods as an introduction to some of the ways NLP problems have been dealt with in the past. Later in these courses you will learn more modern and more powerful techniques like Sequence Models which can take the order of words into account. Naive Bayes is much cheaper to compute than training a Sequence Model, but it’s also not nearly as powerful.