2 Making Blocks.

Slides:



Advertisements
Similar presentations
Section 1 Introduction National 4/5 VB Course. What you should know after this lesson What is a program Who writes programs Why is sequence important.
Advertisements

Mission Technology Introduction to Scratch! June 2007.
Scratch for Storytelling Dr. Ben Schafer Department of Computer Science University of Northern Iowa.
Mr. Wortzman INTRO. TO COMPUTER SCIENCE. UNIT 1 – CUSTOM BLOCKS.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech Oct 2010.
CATCH SCRATCH! Programming from Scratch. Remember Scratch?
Introduction to Scratch!
Introducing Scratch the Cat
Is it a square or a cube? It is a cube It is a pyramid Is it a triangle or a pyramid?
How to make a Shooting Target game in Scratch!. WE ARE GOING TO MAKE A TARGET GAME. This game will have: A Target that will move when clicked. A Timer.
 Review  Created our own motion block called “draw square”  Used script to create a square with side lengths of 100 steps.
Scratch Programming Lesson 2 First glance to programming logic.
By. Circle Draw a circle in the box Tell about its attributes: sides, angles, whether or not it’s a polygon. Add any additional information you know about.
Symmetry - how many lines?. How many lines of symmetry? How many lines of symmetry do these shapes have? Try cutting out the shape and folding it to see.
Tangrams Learning Objectives
Section 1 Introduction National 4/5 Scratch Course.
Attachment 1.
Variables. Todays Lesson  In todays lesson you are going to:  Learn to use variables  Learn to ask for user input  Learn to save the users response.
Digital Art in Scratch part 1 Barb Ericson Georgia Tech May 2011.
Making a Sprite Dance Barb Ericson Georgia Tech June 2011.
Calculating the area of a leaning triangle. Calculating Area.
1 Project designed and created by M. Shajith Kumar.
Drawing with the Pen Barb Ericson Georgia Tech June 2011.
From last time… Explore the blue commands from the motion menu Find at least three ways to get the sprite to move to the UPPER LEFT corner.
First Project: Dance Dance Sprite  Write a dance with your sprite (You pick or create the sprite)  Incorporate as many of the Motion Commands as you.
Digital Art in Scratch part 2 Barb Ericson Georgia Tech Nov 2010.
Adventures in Animation Introduction to Scratch! Michelle Venable-Foster Barb Ericson Dec 2007.
Turtle Graphics Lesson 2 1. There are 3 homeworks to complete during the six lessons of this unit. Your teacher will let you know when a homework has.
What does this do? Pen up? Pen Down? Clear? Set Pen Color? Set Pen Shade? Stamp? 1.
Drawing in Scratch We will be using the Scratch Environment today, so please log in to the Scratch website (scratch.mit.edu)
Functions / Blocks.
Module 2: Investigation 2
Scratch Helicopter Game
Computer Programming.
Broadcasting (Adding a new level)
Here you can learn all about 2-D shapes
Exploring Mathematical Relationships Module 5: Final Challenge
Understanding the Geometric Shape Code
Scratch – Simple Programming
Module 1: Investigation 4 Defining your own Pattern Blocks
Computing Year 7 - Unit 2 Programming Basics Scratch Basics.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Introduction to Coding
Scratch – Simple Programming
Module 2 Lesson 3 Over and Over Again
Areas of the SCRATCH 2 Screen
Here you can learn all about 2-D shapes
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Motion in Scratch 1.
Mod 2 Lesson 2 Repeating Debugging
Mod 2 Lesson 2 Repeating with loops
Game Over Module 4 Lesson 2.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
By 2-D shapes.
Module 2 Lesson 3 Over and Over Again
I can program behaviours using inputs and outputs
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Mod 2 Lesson 2 Repeating with loops
Module 2 Lesson 3 Over and Over Again
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Lesson Six Drawing.
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Pen Cards Pen Cards Back and Forth Draw a Line Special Effects
Using MIT Scratch for Programming and Control Exercise 5 – Drawing with Scratch Year 9 ICT Autumn Term 2007.
2 Making Blocks with INPUTS.
CAMP 1 – MODULE 3 INSIDE MATHEMATICS
Presentation transcript:

2 Making Blocks

1 2 3 Today’s Objectives Know how to break problems down into chunks Know how to define blocks without or with inputs 3 Know how to call the blocks in a program Create programs where you create your own blocks

Draw a square Leave CAT sprite & leave stage WHITE

How to draw a Square 100 Pen down Forward 100 Turn 90 Pen up 90°

Blocks needed to draw a square Motion Pen Pen Add Extensions

How to draw a Square

‘Smarter’ programming Smart programmers break problems down into smaller parts so they can write code in chunks or modules. In Scratch, you create modules by making your own blocks. Scratch Blocks Own Blocks

3 Stages of creating blocks DEFINE You define a block with a meaningful name You add any inputs like special variables to use in the block You call the new block from your program CALL

Define you block Click Make a Block Give it a name Click OK

Defining and Calling Blocks CALL in MAIN program DEFINE call execute return

Defining block - initialise Initialise is coding what you want to happen at the START of your program. call execute return

Challenges 5 6 3 Make a draw triangle block Make a draw pentagon block \ Make a draw triangle block Make a draw pentagon block Make a draw hexagon block Make one up… 120° 360/3=120 72° 360/5=72 5 6 3

Shapes program

[1] Squares Using your draw square block, draw this pattern. Using your draw triangle block, draw this pattern.

1 2 3 Today’s Objectives Know how to break problems down into chunks Know how to define blocks 3 Know how to call the blocks in a program Create programs where you create your own blocks