Ask and Set

For many Scratch programs we find ourselves needing to ask the user questions and use thier answers later. If we need to ask more than one question, only the last answer is available in the answer block. The ask and set design pattern meets this need by prompting the user for an answer, then storing it in a variable:

ask and set design pattern ask and set design pattern

Example

For example, we might prompt the user for thier first and last names, and then greet them by both:

ask and set design pattern example ask and set design pattern example