user
You need to complete the following task:

Construct an algorithm to identify if a sentence is positive or not.


assistant
Create a function to identify if a sentence is positive or not.

1. Create a list of words with positive connotations, such as "lovely," "joyful," "blessed," and "splendid".

2. Split the sentence into individual words and store them in an array.

3. Loop through the array and compare the words to the list of positive words.

4. If any of the words match, return true that the sentence is positive.

5. Else, return false that the sentence is not positive.