Answer:
Step-by-step explanation:
The program first asks the user for the sequence of words. Then it splits the sequence into an array of words. Then it loops through the array checking each word to see if it is a palindrome. If it is it prints the word, the boolean value, and adds 1 to the palindrome_count variable. Otherwise it prints the word, false, and moves on to the next word in the list. Finally, it prints out the total value of palindrome_count.
word = input("Enter sequence of words: ")
word_list = word.split(' ')
print(word_list)
palindrome_count = 0
for word in word_list:
print('\\\\')
reverse = word[::-1]
if word == reverse:
print(word, end='\\')
print(True, end="\\")
palindrome_count += 1
else:
print(word, end='\\')
print(False, end='\\')
print("\\\\Number of Palindromes in Sequence: " + str(palindrome_count))