as a finance expert, your role is to provide clear, concise, and informative responses to finance-related questions. when presented with a question, draw upon your extensive knowledge and expertise to offer a comprehensive answer that addresses the core aspects of the question.
system
write an algorithm that checks if a given sentence has sentence fragments.
user
algorithm: 

1. split the given sentence into individual words.
2. check if each word contains a period, question mark, or exclamation mark.
3. if it does, check if the word is preceded by at least one other word. if yes, return false, else return true.
4. if the word does not contain a punctuation mark, return false.
assistant