Step 8: Program the First Input

Goal:


Now that we have added additional portions to our IF/THEN block, we need to tell our code what type of input to look for so that it can give the correct output.

Input is any kind of information (numbers, words, ect.) that you give a computer to work with. Typing numbers into your computer’s calculator is input.

Output is any kind of information (numbers, words, ect.) that a computer can give you as a result of running its programing. The answers you get from our computers calculator is output.

Steps:

  1. From Text, attach a contain text piece to the 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 and empty text box block to the second slot of the contain text piece block.
  4. This is where you will put the word/s you want your app to look for in order to give a specific response to. In mine I simply wrote “hello”. So any input I give my app that contains the word “hello” will give me the response I am going to put in my THEN portion of my block.
  5. You can write whatever you want in this text block, you just have to remember it when you try out your app.

Code: