Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#2. Create a python program that checks if the input string is a palindrome containing at least 2 vowels You may use either a for

#2. Create a python program that checks if the input string is a palindrome containing at least 2 vowels You may use either a for or a while loop in this solution Create the following: a. a function to input the string that is at least 6 characters long and contains only letters of the alphabet. Convert the string to lower case after input. Return the string to main b. pass the string to a function that checks if the string is a palindrome and returns a bool back to main. If the return value is false, a message should be displayed that the string was not a palindrome and the program should terminate. You can either use the exit function or use a decision structure. c. if the return value from b. is true, pass the string to another function that counts the number of vowels in the string. The function should return the count to main d. When the count of vowels is returned to main, check if the count is at least 2. If the count is 2 or more, display that the string is a palindrome with at least two vowels. If not, display a sentence that the string is a palindrome that does not have at least 2 vowels. The following are acceptable input constraints and must be handled in your logic. Everything else must be rejected by the logic. string input that is at least 6 characters long the input must be made up of only letters of the alphabet (A-Z or a-z) Examples: Enter a string: race car race car is not a palindrome Enter a string: tacocat tacocat is a palindrome with at least 2 vowels Enter a string: mom mom is a palindrome that has less than 2 vowels

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Select Healthcare Classification Systems And Databases

Authors: Katherine S. Rowell, Ann Cutrell

1st Edition

0615909760, 978-0615909769

More Books

Students also viewed these Databases questions

Question

Explain the employee benefits that are required by law.

Answered: 1 week ago

Question

List the types of incentive plans.

Answered: 1 week ago