Question
I am trying to compose an interactive Python program composed of several functions that manipulate strings in different ways.The main() function prompts the user for
I am trying to compose an interactive Python program composed of several functions that manipulate strings in different ways.The main() function prompts the user for a series of strings which are placed into a list container.The user should be able to input as many strings as they choose (i.e., a sentinel-controlled loop).The main function will then pass this list of strings to a variety of functions for manipulation (see below).
The main logic of your program must be included within a loop that repeats until the user decides he/she does not want to continue processing lists of strings.The pseudo code for the body of your main() function might be something like this:
# Create the main function
def main():
# declare any necessary variable(s)
# // Loop: while the user wants to continue processing more lists of words
#
#// Loop: while the user want to enter more words (minimum of 8)
#// Prompt for, input and store a word (string) into a list
#// Pass the list of words to following functions, and perform the manipulations
#//to produce and return a new, modified, copy of the list.
#//NOTE: None of the following functions can change the list parameter it
#//receives - the manipulated items must be returned as a new list.
#
# // SortByIncreasingLength(...)
# // SortByDecreasingLength(...)
# // SortByTheMostVowels(...)
# // SortByTheLeastVowels(...)
# // CapitalizeEveryOtherCharacter(...)
# // ReverseWordOrdering(...)
# // FoldWordsOnMiddleOfList(...)
#// Display the contents of the modified lists of words
#
# // Ask if the user wants to process another list of words
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started