U5Ch1L6_UserInput&Strings
Purpose: Students are introduced to the string data type as a way of representing arbitrary sequences of ASCII characters. Grade Sheet
Vocabulary:
Puzzle #3: Strings.
Don’t put much thought into this. It is easier then you think. No change will occur on the blank iPhone screen. Enter an adequate response between the quotes. Select Run and watch it appear in the Debug Console.
Puzzle #4: Strings.
Again, this is very simple. The program wants to teach you the importance of placing quotes. Initially, there are no responses in the DeBug Console. Add the Quotes and it will perform perfectly in the DeBug Console.
Puzzle #5: User Inputs & Strings.
Follow the steps. When you click Run, you should be able to see a clear description as to what to do in the field, and then you are able to type in the field …but nothing is going to happen! That is the next step.
Puzzle #6: Getting Text Input
Write the code that will allow you to print the name entered by the user on both the Debug Console and the Screen. Hint: follow the code shown in the explanation.
Puzzle #7: Save Input Values In Variables To Be Used Later
Follow the code provided in the explanation. You need to have the Name & Age entered by the user to appear in the Debug Console.
Puzzle #8: Generating Text Output
This was a tough Puzzle. Write a code that receives data being input by the user and inserts it into a sentence that will appear in a ‘text area’ box on the Screen. Hint:
Puzzle #9: String Capitalization
Goal: you want the individuals name that is entered to appear as all capitals in the Text Area sentence. Solution: add a purple UpperCase/str to the Var. Name in the “Var User Message” line of code above.
Puzzle #10: Mad Libs…Design Your App!
In this lesson, you are going to create a Mad Lib. Ask me for the “Create A Mad Lib App.” Grade Sheet.
Puzzle #11: Add a “Newline.”
In this lesson, you will learn how to break up a line of text with a tool known as “Newline” (\n)
So as not to ruin the Mad Lib game you created, we will create a new screen, add the text shown below and then break it up with Newline (\n). Create a Set Text Block of code on the new screen in a new “On Event” block of code. Note: I made my new screen the default screen. When you are done with this assignment, make the Welcome screen the default screen once again. Enter the following text: My favorite fruits are: 1. Apples, 2. Oranges, 3. Lemons. Now add Newline (\n) to the code so that the line numbers appear on different rows.
My favorite fruits are:
1. Apples,
2. Oranges,
3. Lemons.