Write a Python program to check whether the input string is a palindrome. A string is called a palindrome if it appears the same when read forward or backward. Some examples of palindromes are level, radar, civil madam, and racecar. Hint: use program 2 as a function that can reverse the string and compare the original string with the reversed string.
Example Output 1:
Enter string: madam
The input string is a palindrome.
Example Output 2:
Enter string: apple
The input string is not a palindrome.
8. Write a Python program that asks the user to enter a sentence and counts the number of words in the sentence.
Example Output 1:
There are 5 words in the input sentence.
Example Output 2:
Enter a sentence: Best of luck.
There are 3 words in the input sentence.
9. Write a Python program that counts the number of vowels in the input string.
Example Output 1:
Enter a string: Euthopia
There are 5 vowels in Euthopia.
Example Output 2:
Enter a string: apple
There are 2 vowels in apple.