Programming from scratch™

20
Programming from Scratch™ Gerry Rowley

Transcript of Programming from scratch™

Page 1: Programming from scratch™

Programming from Scratch™Gerry Rowley

Page 2: Programming from scratch™
Page 3: Programming from scratch™

In this session

• We will use Scratch to manipulate images• Play sounds• Look at program control• Make decisions• Repeat actions

Page 4: Programming from scratch™

What is a computer?

• Accepts inputs• Does some processing• Has output• Hardware• Software

Page 5: Programming from scratch™

Scratch™

Page 6: Programming from scratch™

Hello World

• Traditionally the first program you write in any language is Hello World

Page 7: Programming from scratch™

Let’s get started

Click on Create

Page 8: Programming from scratch™

Click on Costumes

Page 9: Programming from scratch™

Import 4 ballerinas

Page 10: Programming from scratch™

• Next we will choose a background for the stage.• Here is one I made earlier!

Page 11: Programming from scratch™

• Select Scripts and the Control button

Page 12: Programming from scratch™

• Drag the block on to the script area.

• We want Belinda to dance forever. • Which block would you choose?• Would this work? • How would you make it better?

Page 13: Programming from scratch™

This is mine

Page 14: Programming from scratch™

Meet Nibbles

• He has two costumes• Changing them makes him look as if he is walking• Make it so!

Page 15: Programming from scratch™

• I have imported a background

• This block is not much good but it works!

• I used the duplicatebutton

• Can you moveNibbles?

Page 16: Programming from scratch™

Nibbles moves!

Page 17: Programming from scratch™

Could you find a better way?

• What about this?

Page 18: Programming from scratch™

To stop Nibbles walking off the screen

• We need something new• A variable…• Something that changes• We will use X and Y

Page 19: Programming from scratch™

What does this do?

Page 20: Programming from scratch™

There are more activities here

• https://scratch.mit.edu/starter_projects/