Using .split is a great way to solve this, especially now that it is listed in the Reference, but problem #1 will not require you to use array techniques:
Since there's an instance variable numWords already set up, we can use it in a for loop instead of using a while loop: