Scratch for intermediates course
-
Upload
matthew-parry -
Category
Education
-
view
169 -
download
3
description
Transcript of Scratch for intermediates course
• Teaching•Trained via GTP in Hampshire•Shirland Primary School•Swanwick School and Sports College•Computing at School Master Teacher
• IT career•15+ years as Programmer, Designer, Project Manager•Civil Service, AA, Sony, Satellite TV red button•COBOL, C, C++, VB, Java, Unix, PCs,
• Earlier•Home: ZX81, ZX Spectrum•School: BBC Model B
• To investigate advanced elements of Scratch
• To become familiar with some interfaces to Scratch
• To plan how to use Scratch across the curriculum
OBJECTIVES
• To make a timetables quiz ...
TASK
BroadcastsSends a message to all sprites and stageBut nothing happens unless sprite responds to the message
Green flag is a broadcast message
What is the difference between ...and
Why use?•To get other sprites to do something•Reuse code•Splits script into manageable parts
KS2 work with variables and various forms of input and output
Control BlocksForever Forever if <condition>
Repeat <#>
If <condition> If <condition> else
What difference do these make to your scripts?Where would you use them?
KS2 …use sequence, selection, and repetition in programs ; use logical reasoning to explain how some simple algorithms work
Control BlocksWait until <condition>
Repeat until <condition>
What about these? How do they differ?Where would you use them?
KS2 …use sequence, selection, and repetition in programs ; use logical reasoning to explain how some simple algorithms work
Control BlocksStop script
Stop all
Version 2.0
What different effects do these have?Where would you use them?
KS2 …use logical reasoning to explain how some simple algorithms work
VariablesVariablesA named area of computer memoryA box that stores dataFor something that can change (vary)
Variable for all sprites or Just for a sprite?What difference does that make?
KS2 work with variables and various forms of input and output
Text HandlingText
Task
Ask for users name.Then ask five quiz questions. (Make some of answers numeric)Keep score of correct answers.At end display “<name>, you got <score> out of 5”
KS3 ... understand how data of various types (including text, sounds and pictures) can be represented and manipulated digitally
Validation of InputsValidationTo ensure the input is what you wantWhy?
Task
For quiz numeric answers make sure you get a number.Ask for input again if not valid.
KS2 ... work with variables and various forms of input and output
Build Your Own BlocksBuild Your Own Blocks (Scratch 2.0 only)
Why?To reuse code e.g. validation
What is a Parameter?What is an Argument?
Task
Make number validation blockPass in range parameters <lower> and <upper>Extension: pass in number of digits expected
Variable MonitorsNormal Large
SliderMax/Min
Where could you use each of these?
•For debugging•As changeable text/numbers – e.g. Score•To affect an application e.g. Sphere Maths
KS2 work with variables and various forms of input and output
ListsListsA named area of computer memoryA series of boxes that stores dataFor things that can change (vary)
For all or For sprite
Import list – text file from computerExport list – output to computer
Examples: Haikus ...
KS2 ... work with variables and various forms of input and outputKS3 ... make appropriate use of data structures [for example, lists, tables or arrays]
Tips and Tricks - HelpHelp
Website http://scratch.mit.edu/help/
V1.4Help Menu
Help Page...Help Screens...
Right click on blockV2.0
Tips at right hand side of script area
Blocks ? at top of screen
Tips and Tricks - CommentsComments
V1.4Right click in background – “add comment”Drag comment over block to attach
V2.0Right click on block – “add comment”
Why use?Gives clarity to scriptShows understandingAssessment
KS2 ... use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs
Tips and Tricks – Sprite ControlControl a sprite
V1.4 – at top of sprite scriptsV2.0 – click next to sprite
What do those icons all do?Run this script and click them as it runsWatch x and y and direction ...
V1.4 padlock does same as V2.0 “can drag in player”
What does blue line on sprite/circle do?
Tips and Tricks - TurboTurbo Mode
Speeds up all scriptsV1.4 via edit menuV2.0 shift click on green flag
When would you use this?
When large scriptsComplex maths
Example - Art
Tips and Tricks - DebuggingDebugging
Single Stepping (V1.4 only)See which block is being processed
KS1 ... create and debug simple programsKS2 ... use logical reasoning to explain how some simple algorithms work and to detect and correct errors in algorithms and programs
Tips and Tricks - DrawingPerfect shapes (circles and squares)
When drawing hold down shift
TransparencyV1.4 – white and grey squaresV2.0 – red diagonal line
Tips and Tricks – Animated gifsAnimated gifs
V1.4Drag gif onto costumes tab of an existing spriteOr import gif onto costumes tab of an existing sprite
V2.0Create new sprite using gif
New costume is created from each frame
http://heathersanimations.com/index.html
Need an account on http://scratch.mit.edu/ firstV1.4
Upload project to scratch website via Share menuV2.0
Need to share projectUse “Embed” button below project to create html codeCut and Paste into website
More informationV1.4http://wiki.scratch.mit.edu/wiki/Embedding_Projects_(1.4)V2.0http://wiki.scratch.mit.edu/wiki/Embedding_Projects
Embed projects in own websites
Interfaces to ScratchLego Wedo - education.lego.com
Picoboards (Scratch 1.4) - www.sparkfun.com/products/10311
Kinect2Scratch (Scratch 1.4- scratch.saorog.com/
Scratcher Control for Android - khanning.com/scratchercontrol/
Makey Makey - makeymakey.com/
ResourcesScratch website/forums - scratch.mit.edu/
CAS website - http://community.computingatschool.org.uk/
Scratch website - Lesson Plans & Resources - scratch.ie/home
Derbyshire Computing Share Drive - goo.gl/ucNR17
BOOKSLearn to Program with Scratch by Majed MarjiISBN: 9781593275433
Adventures in Raspberry PI by Carrie Anne PhilbinISBN: 9781118751251