Step 10: Second Input and Output

Goal:


Now that we have one input/output pair, lets program another.

Steps:

  1. From Text, attach a contain text piece to the ELSE IF portion of our IF/THEN block.
  2. From the AfterGetText block, hover over the orange result circle and then grab the get block, and attach it to the first slot in the contain text piece block.
  3. From Text, attach an empty text box block to the second slot of the contain text piece block. I’m going to write “feeling” into my block. You don’t need your app to look for whole sentence, it can find individual words in your sentence. Such as the sentence “How are you feeling today?”
  4. From TextToSpeech, place a call TextToSpeech.Speak message block into the second THEN portion of our IF/THEN block.
  5. From Text, attach an empty text box block to the call TextToSpeech.Speak message block.
  6. In mine I’m going to write “I’m a phone, I don’t have feelings.”

Code: