KEMBAR78
Session 5 | PDF | Cartesian Coordinate System
0% found this document useful (0 votes)
69 views13 pages

Session 5

The document discusses X and Y axes, motion blocks in Scratch, and provides examples for classroom activities using Scratch projects involving numbers, puzzles, and following rules of movement. It also provides homework examples using goto and glide commands.

Uploaded by

svchouhan4
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)
69 views13 pages

Session 5

The document discusses X and Y axes, motion blocks in Scratch, and provides examples for classroom activities using Scratch projects involving numbers, puzzles, and following rules of movement. It also provides homework examples using goto and glide commands.

Uploaded by

svchouhan4
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/ 13

Session 5

Recall test

What is the stage ?

The stage window is the main area where the action of your program takes
place.

What is a motion block?

Motion blocks are the blocks that control a Sprite's movement.

What is the move command ?

Moves the sprite forward the number of steps in the direction the sprite is facing.

What is the turn command ?

Turn the sprite to the specified degree.

What is the forever command ?

Commands inside a forever block will run forever. The Forever command is in the
Control block.
What is if on edge bounce command?

The If on Edge, Bounce command is in Motion Block. If touching the edge of the
screen, the sprite's direction flips over. The block checks to see if its sprite is
touching the edge of the screen with the move command.

What is the set rotation style command ?

This command sets the rotation style of a sprite.

Topic for the session

X and Y axis

The horizontal line is called the x-axis and the vertical line is called the
y-axis.

These two axes divide the Stage into four quadrants.

The point at which the two axes meet is the center of the Stage and is also
called the origin. The origin has x:0 and y:0

Each point on the stage is represented by x coordinate and y coordinate.


On the Scratch stage x-coordinate varies from -240 to 240 and

y-coordinate e
varies from -180 to 180. Points in the first, second, third and fourth
quadrants are (x,y), (-x,y), (-x,-y) and (x,-y) respectively.

X and Y axis:
Ø X axis is the line which runs horizontally from left to right/right to left.

Ø Y axis is the line which runs vertically from top to bottom/bottom to top.
Ø Let’s imagine this way to understand the x and y axis better.

Ø The man in the picture is standing in the middle.

Ø Keep your hands wide apart to make the X axis.

Ø Y rhymes with the word sky! Look at the sky to remember the Y axis.

Go to X() and Y() Command

Go to X() and Y() command makes the sprite reach the specified location in X
and value. We can call it the address of the sprite where it has to go.
Glide x() y() command

Glide () sec to x() and y() commands the block moves its sprite steadily to the
specified X and Y position in the specified number of seconds - this is like
pointing the sprite and moving in that direction.

Difference between Glide and Goto command

The glide command, “glide _ secs to x: _ y: _”, specifies a duration for how long it
will take the sprite to move to the stated point. The goto command, “go to x: _ y:
_”, instantly moves the sprite to the specified point

Wait () seconds command

The block pauses its script for the specified amount of seconds — the wait can
also be a decimal number.

Concept test

What is the X axis?

The horizontal line is called the x-axis


What is the Y axis?

The vertical line is called the y-axis.

What is the origin ?

The point at which the two axes meet is the center of the Stage and is also
called the origin. The origin has x:0 and y:0

What is the go to X() Y() command ?

By using this command, the sprite instantly reaches the specified location
using x and y values.

What is the glide X() Y() command ?

This command moves the sprite to the specified x and y values within the
specified number of seconds.

What is a wait () command ?

This command creates a pause whenever needed.

How to find the location of the sprite on the stage ?

By looking into the x and y values mentioned here.


Difference between goto() and glide()

goto() command simply teleports to the specified sprite and glide


command will make it move slowly on the stage.

Class Activity 1:

Tom is finding it difficult to remember numbers.Tom wants to walk through


all numbers to make it easier to recall.Let’s create a project in scratch
which helps tom to walk through numbers.
-Add button number sprites and cat sprite.
-Add code to make tom walk on all numbers in the correct sequence.
Class Activity 2:Tom and Jerry got in a fight.Jerry ran away.Tom wants to
catch Jerry now.Create project in scratch that helps Tom reach Jerry using
rocks.

-Add background.

-Add cat,mouse and rock sprites.

-Add code to help tom reach to jerry with the help of rocks.

Class Activity 3:Tom is not following traffic rules.So Let’s challenge Tom to
walk on this square box to understand the importance of rules.Tom is not
allowed to go out of the square box.Can you help Tom with it using scratch
project ?

-Paint square box sprite.


-Add cat sprite.

-Add code to make cat sprite walk on the square.

Class Activity-4:

Edward is playing a puzzle with his brother Jonas.They saw 2 parts of unicorn
puzzles and they want to make one.Can you help Edward and Jonas to place the
puzzle pieces of the unicorn in the correct shape using scratch project ?

-Add unicorn sprite’s 2 parts.

-Add code to complete the unicorn puzzle.


Output:

Code for Unicorn part-1:


Code for Unicorn part-2:
Home Assignment

1.Create a project in which give a real effect that the sprite should walk through
the backdrop( eg in the pic below the cat is walking on the slopes), using goto
and glide command in sequence like shown below

2.Create a project in which the cat should go through the black circles in
the correct order.
3.Create a project in which the sprite should walk on the shape like shown below
using goto and glide command

You might also like