Learn Create Program
What is Scratch? Scratch is a free programmable toolkit that enables kids to create their own games, animated stories, and interactive art share their creations with one another over the Internet. Head Office,. 2
What is Scratch? Scratch builds on the long tradition of Logo and LEGO/Logo, but takes advantage of new computational ideas and capabilities to make it easier for kids to get started with programming (lowering the floor) and to extend the range of what kids can create and learn (raising the ceiling). Head Office,. 3
What is Scratch? The ultimate goal is to help kids become fluent with digital media, empowering them to express themselves creatively and make connections to powerful ideas. Head Office,. 4
What is Scratch? Increase student skills with computers Increase student interest in programming Student achievement on fun project Learn Cartesian coordinates, distance computations, etc. Head Office,. 5
Computer scientists Create solutions to problems using computers Study information Invent algorithms Write programs to implement the algorithms Reuse a lot of existing program and machine parts Head Office,. 6
Start scratch and let s go! Click on the cat icon Or, find scratch under Programs When home, download from www.scratch.mit.edu Scratch programming environment comes up quickly Head Office,. 7
Click on the Looks button at the top left. Head Office,. 8
Major components At right: the stage with sprite[s] or objects or actors At left: operations and attributes for the sprites Center: scripts or program[s] for the behavior[s] of the sprites Your sprites are actors that you direct with your scripts Head Office,. 9
Let s implement an algorithm to average two numbers Make a variable number1 (click and drag and set) Make another one number2 Head Office,. 10
Compute average first as sum Make variable average Drag a set operation to script area Drag a + operation Drag variables number1 and number2 to parameters Click to execute Head Office,. 11
Average script as 4 operation sequence. Change the two numbers and click the sequence to execute the block again. Head Office,. 12
But Scratch computes with multimedia color, sound, Can make cartoons Can create stories Can create video games Head Office,. 13
The hello script Can do it in 57 languages java, C++, Scratch Easy in Scratch: select Looks operations and drag the hello operation onto your center panel. Then double click on this lego block : check your sprite behavior at the right Your very first Scratch program! Head Office,. 14
Make the cat 50% larger 1. Select Looks operations 2. Drag the change size operator into your script 3. Click and edit for a 50% change (increase) 4. Double click your one operation script 5. Did your cat sprite get 50% bigger? Head Office,. 15
Scripting a sequence of ops Do ops in the following order by dragging operation blocks into a single connected block Say hello Move 200 steps forward Grow 50% bigger Make the meow sound Head Office,. 16
Some new operations color change (Looks) wait (Control) move (Motion) Head Office,. 17
Starting a looped script Head Office,. 18
Exercise: write a script to Make the cat move along a square path Say hi at all four corners Wait 3 seconds at each corner Change color at all four corners Double size when back to the original starting location. Say That s all folks when done. Head Office,. 19
Elements of Scratch: objects Colors Sounds Locations in 2D space Sprites Costumes Variables (to remember the state of things) Events: that are broadcast for communication Head Office,. 20
Elements of Scratch: control Sequence of operations Loops or repetition Detecting events (key or mouse pressed, sprites overlapping each other, sprites hitting edge of stage, sensor giving value) Head Office,. 21
Loop constructs in Scratch Repeat N times Repeat forever Repeat forever if some condition exists (suppose I m a sprite wandering about this lab until someone asks a question) Head Office,. 22
Conditions can be checked Do something if sprite k hits sprite m Do something if a certain key is pressed Do something is some variable takes a certain value Head Office,. 23
Interacting with your sprite or story Using mouse Entering a character Asking the user a question Head Office,. 24
Sprite follows the mouse Try changing the number of steps or the wait time. Head Office,. 25
Play and examine MadLib Choose the file option at the top of the window Choose open, then examples Choose stories Choose MadLib and then read the authors instructions Click OK, wait for load, click green flag Head Office,. 26
About the MadLib story How many actors (sprites)? What is the role of the girl? How are the answers you give 'remembered' and then used in later actions? What is the role of the little whale? What makes the little whale flip around? What makes the big whale spout? Head Office,. 27
Sprites can interact with each other Can detect when colors overlap in space Can detect when sprites bump into edge of the stage See bouncing balls example under Simulations under Examples Interact with this simulation Check out the rather complex scripts Head Office,. 28
Check out the break dance Open examples; music and dance; break dance How does break dancing begin? What are the roles of the sprites? What events are in the scripts? What should happen when the boom box is clicked? Head Office,. 29
Experiment with Scratch as time permits Try your own scripts: make moves, sounds, interactions in simple cases Try the examples and learn what makes them work Download Scratch on your own machine and experiment some more Direct a story; or a simulation; or create a video game. Head Office,. 30