Scratch for intermediates course

25
Scratch for Intermediates Matthew Parry CAS Master Teacher @becsalana matthew.parry@computingatscho ol.org.uk

description

Scratch for intermediates course

Transcript of Scratch for intermediates course

Page 1: Scratch for intermediates course

Scratch for IntermediatesMatthew ParryCAS Master Teacher

@becsalana

[email protected]

Page 2: 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

Page 3: Scratch for intermediates course

• To investigate advanced elements of Scratch

• To become familiar with some interfaces to Scratch

• To plan how to use Scratch across the curriculum

OBJECTIVES

Page 4: Scratch for intermediates course

• To make a timetables quiz ...

TASK

Page 5: Scratch for intermediates course

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

Page 6: Scratch for intermediates course

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

Page 7: Scratch for intermediates course

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

Page 8: Scratch for intermediates course

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

Page 9: Scratch for intermediates course

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

Page 10: Scratch for intermediates course

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

Page 11: Scratch for intermediates course

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

Page 12: Scratch for intermediates course

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

Page 13: Scratch for intermediates course

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

Page 14: Scratch for intermediates course

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]

Page 15: Scratch for intermediates course

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

Page 16: Scratch for intermediates course

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

Page 17: Scratch for intermediates course

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?

Page 18: Scratch for intermediates course

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

Page 19: Scratch for intermediates course

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

Page 20: Scratch for intermediates course

Tips and Tricks - DrawingPerfect shapes (circles and squares)

When drawing hold down shift

TransparencyV1.4 – white and grey squaresV2.0 – red diagonal line

Page 21: Scratch for intermediates course

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

Page 22: Scratch for intermediates course

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

Page 23: Scratch for intermediates course

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/

Page 24: Scratch for intermediates course

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

Page 25: Scratch for intermediates course

BOOKSLearn to Program with Scratch by Majed MarjiISBN: 9781593275433

Adventures in Raspberry PI by Carrie Anne PhilbinISBN: 9781118751251