+ All Categories

L5

Date post: 15-Aug-2015
Category:
Upload: lerpo
View: 10 times
Download: 5 times
Share this document with a friend
13
Using Blockly App development in AppShed
Transcript
Page 1: L5

Using Blockly

App development in AppShed

Page 2: L5

App development in AppShedL5 Using Blockly

Objectives• Use the Blockly Visual Programming

editor• Use variables and if statements in a

Blockly program• Create a quiz in an app• Debug a program if there are any errors

Page 3: L5

App development in AppShedL5 Using Blockly

Creating your quiz• Add a new tab to your App • Give it a suitable icon and

call it Quiz• Decide where you want

your tab to be using the Move tool

Page 4: L5

App development in AppShedL5 Using Blockly

Blockly• Blockly is a simple programming tool which

uses puzzle pieces rather than actual programming code

Page 5: L5

App development in AppShedL5 Using Blockly

Recording the Question Screen IDs• Write down the

Screen ID found at the bottom right of the screen. Keep a record of which screen is associated with which ID.

• E.g. Question 1 = 2380904

Page 6: L5

App development in AppShedL5 Using Blockly

Recording question reponses• The Name box is used to define a variable to

record the question responses

Page 7: L5

App development in AppShedL5 Using Blockly

The OK button and Blockly Actions• Use the OK button and apply a Blockly Action

Page 8: L5

App development in AppShedL5 Using Blockly

What is a variable?• A variable is a named place in the computer's

memory where you store some data• Most commonly, variables are used to pass

this data from screen to screen

Page 9: L5

App development in AppShedL5 Using Blockly

How variables are used in this app?• This app uses a variable to hold the user’s

response to a question• The name of the variable is, for example, Q1• Q1 will hold the response, for example, ‘B’• The program will then compare the value of

Q1 with the correct answer• If they match, the next question is shown• If not, a message ‘Try again’ is shown

Page 10: L5

App development in AppShedL5 Using Blockly

If statements• If statements are used to create two possible

outcomes based on the value of a variable• In Blockly they work in the format: If, do, else

• If Q1 = “A” do NEXT QUESTION else TRY AGAIN

Page 11: L5

App development in AppShedL5 Using Blockly

Blockly instruction blocks• Try reading these instructions. What do they do?

Page 12: L5

App development in AppShedL5 Using Blockly

Blockly and JavaScript• How does Blockly relate to JavaScript code?

Page 13: L5

App development in AppShedL5 Using Blockly

The finished question screens


Recommended