- Topic 1
Scratch 2 is an improvement on Scratch 1.4 as it allows the user to write procedures.
This allows code to be broken into manageable blocks and even pass variables (called parameters ie measure across) between procedures. This means the same block of code can be run more than once, and it can return different values. For example, code to run a robot forward may not need any values to say how long. and does not return a result to the computer.
A function is a special type of procedure that returns only one value. For example, if I asked you what today is, there is only one answer. Tomorrow, the same question would give a different answer but again only one.
A function that did this could be called "today".
Download Scratch 2 here.
Beware, you have to install Adobe Air 2 as well.
- Topic 2
Data and data types
Computers are really good at manipulating data very quickly. It follows some idea of data and data types is required.
It is important that the computer "knows" what sort of data it is dealing with so it can store it into memory in the right way. Data in Scratch can be stored in a computer in three different ways.
to name a few.
Because Scratch is not strongly data typed, it can be flexible in the way stores data
- characters can become strings
- numbers can be integers or real numbers
- Topic 3
- Topic 4
A procedure is a block of code that is written as a stand alone that can be called from a driver routine and used over and over again.
You can aloso save these procedures and create "libraries" of code that can be shared.
Scratch 2.0 Custom blocks
- Topic 5
Messages were a way to call code used in Scratch 1.4.
Using procedures is more efficient.
- Topic 6
A parameter is a variable that can be passed from procedure to procedure.
There are three types of parameters
- global for all sprites
- local for one sprite
- cloud that is stored externally on a server
- Topic 7
- Topic 8
Top down planning
- Topic 9
Capturing data : files
- Topic 10
- Topic 11
A list (called an array in other programming languages) is a tool that can be used to store multiple pieces of information at once.
They are in the form
x(1) = All Star
x(2) = Hey Ya!
x(3) = Hey Ya!
x(4) = All Star
x(5) = Hey Ya!
x(6) = All Star
Each entry is called an element.
Create a list
Just go to data and create a list.
Opposite are the tings you can do to manipulate the elements in the list.
Lists and arrays are used frequently in storing data. They are a powerful way of creating databases and manipulating data into information.
The data is sorted, searched, ranked, calculated and graphed, to name a few. It is the way the NSA in America keeps electronic tabs on you.
A fun example
As a way of exploring sentence construction, folks came up with this kind of game.
The following is a random sentence generator. It contains personal pronouns, adjectives and nouns.
You can store them in lists, then use random numbers to generate your own sentences.
Non smarty pants kids may be tempted to create sentences that they think funny but might offend others.
List, array, element, data, information, data base,
- Topic 12
- Topic 13
- Topic 14
- Topic 15
- Topic 16
- Topic 17
- Topic 18
- Topic 19
- Topic 20