Scratch is a fun, free, beginner-friendly programming environment where you connect blocks of code to build programs. While most famously used to introduce kids to programming, Scratch can make computer science approachable for people of any age. Rather than type countless lines of code in a cryptic programming language, why not use colorful command blocks and cartoon sprites to create powerful scripts?In Learn to Program with Scratch, author Majed Marji uses Scratch to explain the concepts essential to solving real-world programming problems. The labeled, color-coded blocks plainly show each logical step in a given script, and with a single click, you can even test any part of your script to check your logic. You'll learn how to: Harness the power of repeat loops and recursion Use if/else statements and logical operators to make decisions Store data in variables and lists to use later in your program Read, store, and manipulate user input Implement key computer science algorithms like a linear search and bubble sortHands-on projects will challenge you to create an Ohm's law simulator, draw intricate patterns, program sprites to mimic line-following robots, create arcade-style games, and more! Each chapter is packed with detailed explanations, annotated illustrations, guided examples, lots of color, and plenty of exercises to help the lessons stick. Learn to Program with Scratch is the perfect place to start your computer science journey, painlessly. Intro -- About the Author -- About the Technical Reviewer -- Acknowledgments -- Introduction -- Whom This Book Is For -- A Note to the Reader -- Features -- Organization of This Text -- Conventions Used -- Online Resources -- Errata and Updates -- Chapter 1: Getting Started -- What Is Scratch? -- Scratch Programming Environment -- Sprite List -- The Stage -- try it out 1-3 -- Blocks Tab -- Scripts Area -- try it out 1-5 -- Costumes Tab -- try it out 1-7 -- Sprite Info -- Backdrops Tab -- Sounds Tab -- Toolbar -- Paint Editor -- Setting the Center of an Image -- try it out 1-10 -- Setting Transparent Color -- Your First Scratch Game -- Step 1: Prepare the Backdrop -- Step 2: Add the Paddle and Ball -- Step 3: Start the Game and Get Your Sprites Moving -- try it out 1-11 -- Step 4: Spice It Up with Sound -- Scratch Blocks: An Overview -- Arithmetic Operators and Functions -- Arithmetic Operators -- Random Numbers -- Mathematical Functions -- Summary -- Problems -- Chapter 2: Motion and Drawing -- Using Motion Commands -- Absolute Motion -- Relative Motion -- try it out 2-2 -- Other Motion Commands -- Pen Commands and Easy Draw -- try it out 2-3 -- try it out 2-4 -- The Power of Repeat -- try it out 2-5 -- Rotated Squares -- Exploring with Stamp -- try it out 2-7 -- Scratch Projects -- Get the Money -- Catching Apples -- More on Cloned Sprites -- Summary -- Problems -- Chapter 3: Looks and Sound -- The Looks Palette -- Changing Costumes to Animate -- try it out 3-1 -- Image Effects -- Sprites That Speak and Think -- try it out 3-3 -- Layers -- The Sound Palette -- Playing Audio Files -- Controlling Sound Volume -- Composing Music -- Playing Drums and Other Sounds -- try it out 3-5 -- Setting the Tempo -- Scratch Projects -- Dancing on Stage -- Fireworks -- Summary -- Problems -- Size and Visibility -- Chapter 4: Procedures.
|