30 min intro to Scratch

28 3 0
30 min intro to Scratch

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Make variable average Drag a “set operation” to script area Drag a + operation Drag variables number1 and number2 to parameters Click to execute 30 min Scratch July 2009... Average scrip[r]

30 intro to Scratch A Quick-and-Dirty approach Leaving lots of exploration for the future (5 hour lesson plan available) 30 Scratch July 2009 Objectives of Scratch unit     Intro to visual programming environment Intro to programming with multimedia Story-telling | music-making | game-making Intro to programming concepts objects and attributes For sequence, repetition instructors conditions, events, I/O 30 Scratch July 2009 Secondary objectives     Increase student skills with computers Increase student interest in programming Student achievement on fun project Learn Cartesian coordinates, distance computations, etc 30 Scratch July 2009 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 30 Scratch July 2009 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 30 Scratch July 2009 Click on the “Looks” button at the top left 30 Scratch July 2009 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 30 Scratch July 2009 Let’s implement an algorithm to average two numbers   Make a variable “number1” (click and drag and set) Make another one “number2” 30 Scratch July 2009 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 30 Scratch July 2009 Average script as operation sequence Change the two numbers and click the sequence to execute the block again 30 Scratch July 2009 10 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” 30 Scratch July 2009 14 Some new operations color change (Looks) • • wait (Control) • move (Motion) 30 Scratch July 2009 15 Starting a looped script 30 Scratch July 2009 16 Exercise: write a script to       Make the cat move along a square path Say “hi” at all four corners Wait 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 30 Scratch July 2009 17 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 30 Scratch July 2009 18 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) 30 Scratch July 2009 19 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) 30 Scratch July 2009 20 ...Objectives of Scratch unit     Intro to visual programming environment Intro to programming with multimedia Story-telling | music-making | game-making Intro to programming concepts objects... machine parts 30 Scratch July 2009 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 30 Scratch July 2009 Click on the “Looks” button at the top left 30 Scratch July 2009 Major components     At right: the stage with sprite[s] or objects or actors At left: operations

Ngày đăng: 13/11/2021, 08:34

Tài liệu cùng người dùng

Tài liệu liên quan