0% found this document useful (0 votes)
43 views20 pages

Lesson 2 Scratch

Uploaded by

kelemnisi12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views20 pages

Lesson 2 Scratch

Uploaded by

kelemnisi12
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Solution Development:

Introduction to Scratch
– a Graphical Programming Tool

1
Step 1 - Saving your project

1. Open a new Scratch document


2. Save your project as MyFirstDanceOff
3. Remember to put your name in as the project author
4. Type a short sentence stating you are going to make project of a
sprite dancing

2
Step 2 – Get your Sprite
ready
1. Go to the Cat Sprite and import 4 new sprites from the People
folder called Ballerina-a, Ballerina-b, Ballerina-c, Ballerina-d

2. Delete the two Cat sprites


3. Rename your Sprite name to - Ballerina

3
Step 3 – Choose your
backgrounds
1. Click on the Stage
2. Import the Hall background from the Indoors folder
3. Import the Spotlight-Stage background from the Indoors folder
4. Rename the last background to Spotlight
5. Delete the Blank background

4
Step 4 – Let your Sprite move
1. Click on the Ballerina

2. Click on Scripts

3. Click on the Motions Block

4. Click on Move 10 Steps, hold


in your mouse and drag it to
the Scripts Area

5. Drop the block

6. Click on the Move 10 Steps


block in the Scripts Area and
see how your sprite moves

5
Step 5 – Let your Sprite talk
1. Click on the Ballerina

2. Click on Scripts

3. Click on the Looks Block

4. Click on
hold in your mouse and drag it
to the Scripts Area

5. Do the same again


and change the text
inside the box

6. Click on the any one of the


three blocks in the Scripts
Area and see how your sprite 6
moves and talks
The sprite wants to invite you to
go and watch the show…

How can I get the Ballerina to call me by name?

7
Step 6 – The Sprite must get your
name and remember it
1. Click on Sensing

2. Click and drag the instruction to


the scripts area

3. This will allow the user to enter his/her name into a box at the
bottom of the screen.

8
The sprite wants to invite you to
go and watch the show…

How will the ballerina be able to remember my name?

9
Step 6 – The Sprite must get your
name and remember it
S p r i te o r
a n t t he
en y ou w
m b e r any
Wh rem e we 1. Click on Variables
r a m t o a m e
prog y o ur n
e / s l i ke r i a bl es.
valu c re ate va ne of us
to anyo
need w h e n w i l l all 2. Click on Make a
s e e
Becau program w me. variable
is a
use th a different n
n
type i

3. Give your variable a


name

Then you will see these


instructions appear in
the Block palette
10
Why make use of variables?

• Variables allow us to get input from the user.

• These values that we get from the user will seldom be the same

as any other user. In this case you can’t put your name in

permanently, because if your friend uses your program, he/she

wants to be greeted using their name.

• Variables make it easy for us to complete our program even

though we are not sure about the values that we will obtain from

the users of the program. 11


Working with Variables
You can add another variable
You can delete a certain variable

This is the variable you have created (Name)

This instruction is used to assign a value to the variable

This instruction is used when you want to increase/


decrease the variable value – if it is a number data type

These instructions allow us to see the


variables value on the stage or not. We would
like to see the values while we are testing our
program, but would like the variable to not be
visible when the user uses the program.

12
Step 6 – The Sprite must get your
name and remember it
1. Click on Variables

2. Click and drag the instruction to the


scripts area

3. Click on Sensing

4. Click and drag the Answer instruction to the scripts area inside
the box of the Set Name to 0 instruction. This step then
allocates the answer of the user to that specific variable.

13
Step 6 – Invite the user using
his/her name
1. Click on Operators

2. Click and drag the instruction to the scripts


area. This instruction will allow you to combine more than one
sentence, so that the script can Invite the user by using their
name.

3. Change the first section of the instruction to Please come join


me

4. Drag and drop the Variable Name that you created into the
second part of the operator instruction.
14
Step 6 – Look at how she invites
you personally

1. Add the instruction from the Control

block. This instruction is added to ensure that when the is

clicked the program will start.

15
Step 7 – Move towards the red
doors and then go into the theatre

1. Determine the position of the red door that you are


supposed to enter by using your mouse and looking at
the x/y-axis values.

2. Let the sprite move to that position

3. Change the background to the stage. (Next Slide)

16
Change the background of the
stage
ollow these steps, the Broadcast will be explained in another lesson.

1. Click on Control

2. Drag and drop Broadcast onto the scripts area

3. Click on the arrow and enter the value “Enter Theatre”

17
Change the background of the
stage
ollow these steps, the Broadcast will be explained in another lesson.

1. Click on the Stage

2. Drag and drop the following instructions to change the


background as soon the ballerina has entered through the doors
from the hall

18
Change the background of the
stage
ow will we be able to see the hall every time we start the program?

1. Click on the Stage

2. Drag and drop the following instructions to change the


background to the hall as soon as the green flag is clicked.

19
Complete worksheet

20

You might also like