im doing a project with methods and advanced dictionaries ill post criteria as well this program also includes menus too
Retrieve A Quote
For this menu option, create a custom function called RetrieveQuote. This function should take in a Dictionary and return nothing.
In this function, display a list of the books that have already been added to the Dictionary.
Prompt the user for which book they would like to see their favorite quote from. Be sure to validate that the user is typing in a valid Key that is in the Dictionary.
Once the user has chosen a book. Send the matching pair, which is the quote, to a custom function that you create called CountWords. This function should take in a string and return a number.
Inside of the custom function, you will have to split apart the string that contains the quote into a string array. This should leave one “word” in each element of the array. Now you can use a property of the array to get the total number of words or elements inside of that array. Return this number back to the function for the menu option.
After you catch the returned value in a variable back in the RetrieveQuote function, report out to the user the name of the book, the quote and the total number of words in the quote.
Use this format:
“Your favorite quote from BOOK TITLE is:”
“INSERT QUOTE HERE”
“The quote contains # words.”
After that display the menu again and let the user choose which option to do next.
this is what i need to fix!