0% found this document useful (0 votes)
13 views

Growing+Flowers+-+Creative+Coding+with+Scratch

Uploaded by

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

Growing+Flowers+-+Creative+Coding+with+Scratch

Uploaded by

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

Creative Coding with Scratch

Growing Flowers
Getting Started

Select Tree backdrop.

Choose Butterfly 2 from the sprite


library.

Create a flower sprite using the


Paint tool and rename it Flower.

Challenge 1
Can you resize Butterfly 2 and position it to the left of the Stage?

Challenge 2
Can you duplicate the Flower five times, position them in a row across the Stage and
program them to reset size when the green flag is clicked?

Challenge 3
Can you make Butterfly 2 move across the Stage when spacebar is pressed, bouncing off
the edge?

Challenge 4
Can you make each Flower grow as Butterfly 2 flies past?

I can:

use the Paint tool to create a sprite;


resize a sprite;
duplicate a sprite;
make a sprite move when spacebar is pressed;
make sprites bounce, if on edge;
make a sprite interact with another sprite,

Page 1 of 3 visit twinkl.com


Helpful Hints
Growing Flowers
Use these hints to help you complete the challenges. They will not give you the
complete solution to the algorithm but should help you on your way.

The following code belongs on Butterfly 2 and all Flower sprites:

To resize and position a sprite:

Top Tip
when clicked
If Butterfly 2 goes behind the
Flower sprites, use the go to front
set size to % layer block to position it in front.

go to front layer
go to x: y:

The following code belongs on Butterfly 2:

To make a sprite move when space key pressed


with the spacebar: move 20 steps

Top Tip
To resize and position a sprite:
To make sure the sprite rotates
accurately when bouncing off the
edge, use the set rotation style block.

if on edge, bounce
set rotation style left-right

Page 2 of 3 visit twinkl.com


Helpful Hints Growing Flowers
The following code belongs on all Flower sprites:

To make a Flower sprite grow as another sprite touches it:

when space key pressed if then

touching Butterfly 2 ? change size by 5

Top Tip

and size
To ensure the Flower sprites
grow to a specific size:

< 200

Page 3 of 3 visit twinkl.com


Creative Coding with Scratch
Growing Flowers Answers
Each Creative Coding Challenge is an open-ended task, which can be approached in
many different ways. Pupils should be encouraged to have a go and tackle these tasks
independently. The helpful hints are not intended to provide complete solutions but may
serve as useful cues for supporting less-confident coders.

The following algorithms are just one possible solution to each challenge.

Challenge 1 Challenge 2

The following code belongs on


The following code belongs on Butterfly 2:
all Flower sprites:

when clicked
when clicked

go to front layer set size to 80 %

set size to 50 %

go to x: -192 y: -84

point in direction 90

Page 1 of 2 visit twinkl.com


Creative Coding with Scratch Growing Flowers Answers

Challenge 3

The following code belongs on Butterfly 2:

when space key pressed

move 20 steps

if on edge, bounce

set rotation style left-right

Challenge 4

The following code belongs on all Flower sprites:

when space key pressed

if touching Butterfly 2 ? and size < 200 then

change size by 5

Page 2 of 2 visit twinkl.com

You might also like