Understanding the Geometric Shape Code Intro to scratch Understanding the Geometric Shape Code
The interface
Stage/Canvas Script Area Block Palette Sprites Pane
Block types What types of blocks exist in Scratch? There are a 145 blocks total in Scratch 2.0.
Hat blocks Used to start a script Found on the Control or Event palette Most commonly used ‘Hat Blocks’ are the When Flag Clicked and When Key Pressed. When I start as a Clone is the only ‘Hat Block’ in the Control palette. There are eleven ‘Hat Blocks’ in Scratch 2.0.
Stack blocks Used to create the script Found in most palettes except Operator palette There are 77 Stack blocks.
Boolean Block Reports true or false Found in Sensing, Operator, or Variable palettes There are 13 Boolean Blocks in Scratch 2.0.
Reporter Blocks Contains a value (ie string, integer) Found in most palettes There are 37 reporter blocks.
‘C’ block Perform conditions or loops All are found within the Control palette There are five C blocks.
Cap Block Stops the script Found within the Control palette There are two Cap blocks.
Blocks What blocks did we use?
Motion blocks
Motion and Stack block Moves the sprite forward one pixel, in the direction the sprite is facing Motion and Stack block Turns the sprite the specified amount of degrees, clockwise or counter- clockwise Motion and Stack block Sets the sprite’s X and Y position to the specified amounts
Pen blocks
Pen and Stack block Clears the screen of everything on the canvas except the sprite Pen and Stack block The sprite leaves a continuous pen trail wherever it moves Pen and Stack block The sprite stops leaving a pen trail when it moves
Increments or decrements a pen’s color by the specified amount Pen and Stack block Sets the pen’s color to a specified color with the color- picker or a numeric value Pen and Stack block Increments or decrements a pen’s color by the specified amount There are 199 color values.
Pen and Stack block Sets the pen’s shade to a specified amount Pen and Stack block Changes the pen’s shade by a specified amount
Data Blocks Variable Blocks
Variable and Stack block The variable is set to a specified value Variable and Stack block The variable is incremented or decremented by a specified amount
Variable and Stack block Shows the specified variable’s Stage Monitor Variable and Stack block Hides the specified variable’s Stage Monitor
Event Blocks
Events and Hat block Scripts that have this Hat will activate when the Green Flag is clicked Events and Hat block Scripts that have this Hat will activate when the specified key is pressed
Control Blocks
Control and C block Blocks within this block will repeat a given amount of times before continuing with the rest of the script Control and C block Blocks within this block will repeat until the condition is met before continuing with the rest of the script
Operator Blocks
Operators and Boolean block Checks to see if the first value is equal to the other value(s) Operators and Boolean block Joins two Boolean blocks so either one can be evaluated Operators and Boolean block Checks if the first value is greater than the other value(s)
Geometric code
Challenge
Challenge
Challenge
Challenge