Question: Create a function named Words that accepts a string as an argument. The function should return an integer representing the number of words in a

Create a function named Words that accepts a string as an argument. The function should return an integer representing the number of words in a string. A word is a sequence of characters separated by one or more spaces or tabs. Be careful, you can't just count spaces and tabs. Two or more consecutive spaces do not mark two or more words. Multiple tabs and spaces separate one word. Create a second function named Sentences having the same argument and return value. Return the number of sentences in the string. Remember that sentences end in a period. Create a button and write the necessary code to test the functions that you just wrote. To complete this question, remember the Microsoft.VisualBasic.ControlChars class and that a string is nothing more than a collection of characters, so it can be enumerated using a For Each loop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!