Time for action – scanning a text string to build a list of words
The main task in this project is to look for spaces and create new entries in a list when we find one. Let's step through the blocks:
- For the teller, create a new list named
scanned words
and a new variable named letter#. - Since we will recreate the scanned words list each time we get a new question from the seeker, we need to delete all the items before we analyze the new answer block value. Drag a delete (all) from (scanned keywords) list from the Data palette to the Scripts area.
- Next, set the letter# variable to 1, which will track our progress through the answer value.
- To iterate through the characters in the answer value, attach a repeat (length of (answer)) block to the stack.
- Then, add an if () then else block. We will evaluate the current character of the answer value to determine if it is equal to a space. The Boolean expression will be as follows: ((letter (letter#) of (answer)) = ( )). You need to actually...