An input enters some data for a program to use.
The data can be numbers, letters or even words.
It could be sound or an electric current from a sensor or switch.
The ask block is an excellent example of an input.
It makes the program to wait until the user has typed in an input and pressed the enter key.
The data entered by the user is automatically stored in the program in a variable named answer.
E.g. The spelling test script on the right uses a blue ask block to get the user to type their answer.
Study the script to understand how it works.
The user inputs their spelling which the program compares with the correct data - in this case CAT.
If the answer matches the correct data the output will say "Well done" for 2 seconds.
Q9. How many times will the script above ask the question "How do you spell?"
Q10. What would the output be if the user input D O G instead of C A T ?