Learning Target:
I can define variable and understand its use in programming.
I can pay attention to detail while programming and troubleshooting an app.
I can pair program to create an app.
I can use my resources (background knowledge, help menu, teacher resources, online resources and my co-worker) to troubleshoot and debug my app.
Concepts/Vocab this Lesson: variable, mutator
Task 1: Try Advanced Apps
Now you are ready to take the final step!
You and your partner will choose an app from the list of available tutorials below. You will then create the app using the video/written tutorials linked below. Remember, this app will be even more in depth and require closer reading. It may take both of you several times to understand the procedure. Do not give up! Remember how to debug- -run it, see what it does, then brainstorm solutions together to make the change. You will have several days to do this.
It is also important that once you are finished, you will need to add to your vocab and reflection blog.
Choose Your Own Adventure Apps
Images are in the Shared with Me folder 'AI2 Images and Sounds' in your Google Stream. Make sure when you add the Clock component (it is now in the Sensors palette, not the User Interface, you 'uncheck' the enabled box on the Designer page. When you test your app, please make sure you are using two words so I can test that the space works. If it not working, be sure you understand that in space, it may seem like there is nothing, but is space really nothing or something? In addition, if you have typed in 'Hello' and it gets stuck on 'H' ask yourself if you told it what to do for the letter 'H' You told it what to do for the letter 'h' not 'H' Make sense? When screencasting, be sure to show that both the speak and translate buttons work for a min. two word phrase. If you are having trouble with your app, please try watching this troubleshooting video for common mistakes.
Sounds are in the folder 'AI2 Images and Sounds' on your Google Stream. Read the directions carefully. The Procedure you are creating is replacing the insides of the first two buttons you created. When the directions say the 'Definition Drawer' it means the 'Procedure' drawer. When it mentions the 'arg socket,' it is the blue wheel (mutator), which allows certain blocks to expand, shrink or even change their functionality. When it asks you to drag a name block into the "arg" socket of to procedure, you will instead use the arg socket to drag the 'input: x' into the procedure. Then you will rename 'x' to 'number.' See gif below. When asked to add the second horizontal arrangement, you will want to go to the Screen 1 component and check the 'scrollable' box so you can scroll to see it. You will also use this for the If>Then>Else command. Play_Note is different than PlayBackNote. Make sure when you add the Clock component, you 'uncheck' the enabled box on the Designer page. While screencasting, make sure to test the PLAY and RESET buttons to show me they work. If you are having trouble with your app, please try watching this troubleshooting video for common mistakes.
Images are in the Shared with Me folder 'AI2 Images and Sounds' in your Google Stream. You will create a design interface that holds four canvases. When you take a picture, it should place the image in canvas 1. When you take a second picture, it should go to canvas 2 and so on, If you hit the 'share' button, it should bring up email. You do not need to email a pic. (Please don't as the android is likely logged into my account.) When you add the buttons to the bottom, you likely cannot see them. Please go to Screen 1> Properties and scroll down to property 'Scrollable.' Check it on.
You will be using your own images. You will need to find one for the back of the card and three for the pairs. Be sure to rename them so they are easy to retype and that you are 'calling' them by typing the exact name in your code. You will want to upload these images to the Media section (below Components) on the Design page. Make sure you keep the variable 'card' and 'Cards' separate while coding. Follow the tutorial closely. While testing, make sure to play the game until you win and ensure the notification pops up in the screencast. Make sure when you add the Clock component, you 'uncheck' the enabled box on the Designer page. If you are having trouble with your app, please try watching this troubleshooting video for common mistakes.
Be sure to keep the variables 'card' and 'cards' separate. In addition, make sure you are precise when selecting the lists blocks.
Mario App
You will watch the first tutorial to create the animated Mario. (It shows some of the design components already added. You will just recreate that.) Images are in the Shared with Me folder 'AI2 Images and Sounds' in your Google Stream. When you insert the imageSprite1 and imageSprite2, please set the height to 90 pixels and the width to 50 pixels. Make sure they are named the same when you upload them. Once you complete the first video, please delete the 'debug' label that you created. You will then watch the second tutorial to animate the coin. Be sure to watch carefully as he does the code as he moves around things, deletes things and then readds them. You might want to slow it down to .75 or .5 speed in video settings if it is too fast. Lastly, when you test it, make sure you HOLD the right and left buttons to move Mario.
Task 2: Understanding Variables
In order to use a variable, you must first create the variable or 'initialize' the variable.
Once you 'initialize' the variable, you have two options while programming:
1. 'Set' the variable to a new value/string or
2. 'Get' the value/string of the variable.
Some blocks have a small blue wheel called a mutator. By clicking on this wheel, you may 'mutate' the block by adding more inputs.
Task 3: Debug your App, Screencast and Turn In
This part often takes longer to solve a small problem than creating and programming the entire app. Spelling matters! Capitalization and spacing matters! Get your app up and running on the android and see how it behaves. Ask yourself, where is it going wrong? What does the error say? In what piece of code is it malfunctioning? Work through your frustration... in the end you will be glad you did!
Task 4: Adding to Your Reflection Blog
Go to your Reflection Blog to the entry titled "Variables" and explain where you used a variable in your app and what type of information you used it to hold a space in memory for (orange blocks).