Monday, September 10, 2012

App Inventor: Magic 8 Ball


APP INVENTOR SECOND TASK: MAGIC 8 BALL:

The first step for creating this app was to add in the components to make this game.
This included an image, text and a sound. 
The image is a button that has had an image to replace the text with.
The text was created using a label that displays the first question asked to the user. This is then placed in a vertical arrangement so that the responses of the eight ball are also displayed in the same area as the question. 

The next step was to open the blocks editor and then add in the commands so that the eight ball displayed an answer when it was clicked.
The eight ball has eight possible outcomes for answers that it can give as an answer. When an answer is given a sound is also accompanied by the response. 


The final step was to connect the app into the app inventor emulator (or android phone) to test this app.




App Inventor: Hello Purr


APP INVENTOR FIRST TASK: HELLO PURR

The first task with making this app was adding in all the components to make the app work. This included adding a image (kitty) as well as text (pet the kitty) and sound (meow). The image of the kitty is a button icon, the text it a label and the sound is a sound component.
The next step was to open the block editor which allowed for the cat to make a sound (meow) when the image was clicked on.  


The final step was to open to created app on either a mobile device or on the mobile emulator. This enabled us to play with the app we had just created. 

Selection and Repetition


Selection and Repetition


As we have mentioned in previous lessons Algorithms are composed of three basic structures. Sequence, Selection and Repetition.

We have already looked at sequence (the single steps in the algorithms we did before are sequence) so what are selection and repetition.

Solving a problem often involves making a decision between two or more options. In an algorithm this process of making a decision is called selection.

Describe, in plain english, an algorithm for;
(you may need to research algorithms in google.
Use the word “if” ie If red then ……)

1.    Moving through a set of traffic lights.
2.    Deciding whether to take an umbrella to school.
3.    Giving a student an A, B or C on their test.

Often an algorithm will often require you to repeat a task in order to solve a problem; when this is done in an algorithm the structure is called repetition.

Describe, in plain english, an algorithm for;

1.    Adding the correct amount of cordial to water to make a drink.
2.    Filling a bucket with water.
3.    Blowing up a balloon.

Remember to post all this in your blog along with any useful links you find in the process.