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
Learn to Program with Scratch: A Visual Introduction to Programming with Games, Art, Science, and Math
β Scribed by Majed Marji
- Publisher
- No Starch Press
- Year
- 2014
- Tongue
- English
- Leaves
- 290
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
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 sort Hands-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. Uses Scratch 2
β¦ Table of Contents
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
Message Broadcasting and Receiving
Sending and Receiving Broadcasts
Message Broadcasting to Coordinate Multiple Sprites
Creating Large Programs in Small Steps
Creating Procedures with Message Broadcasting
Building Your Own Block
Passing Parameters to Custom Blocks
try it out 4-1
Using Nested Procedures
try it out 4-2
Working with Procedures
Breaking Programs Down into Procedures
try it out 4-3
Building Up with Procedures
Summary
Problems
Chapter 5: Variables
Data Types in Scratch
Whatβs in the Shape?
Automatic Data Type Conversion
Introduction to Variables
What Is a Variable?
Creating and Using Variables
Try It Out 5-1
The Scope of Variables
Changing Variables
Try It Out 5-2
Variables in Clones
Displaying Variable Monitors
Using Variable Monitors in Applications
Simulating Ohmβs Law
Try It Out 5-3
Demonstrating a Series Circuit
Visualizing a Sphereβs Volume and Surface Area
Try It Out 5-5
Drawing an n-Leaved Rose
Try It Out 5-6
Modeling Sunflower Seed Distribution
Getting Input from Users
Performing Arithmetic Operations
Reading Characters
Reading a Number
Summary
Problems
Chapter 6: Making Decisions
Comparison Operators
Evaluating Boolean Expressions
Comparing Letters and Strings
Decision Structures
The if Block
Using Variables as Flags
The if/else Block
Nested if and if/else Blocks
Menu-Driven Programs
Logical Operators
The and Operator
The or Operator
The not Operator
Using Logical Operators to Check Numeric Ranges
Scratch Projects
Guess My Coordinates
try it out 6-1
Triangle Classification Game
try it out 6-2
Line Follower
Equation of a Line
Other Applications
Summary
Problems
Chapter 7: Repetition: A Deeper Exploration of Loops
More Loop Blocks in Scratch
The repeat until Block
try it out 7-1
Building a forever if Block
try it out 7-2
Stop Commands
try it out 7-3
Ending a Computational Loop
Validating User Input
Counters
Check a Password
Counting by a Constant Amount
Revisiting Nested Loops
Recursion: Procedures That Call Themselves
Scratch Projects
Analog Clock
Bird Shooter Game
try it out 7-8
Free-Fall Simulation
try it out 7-9
Projectile Motion Simulator
try it out 7-10
Other Applications
Summary
Problems
Chapter 8: String Processing
Revisiting the String Data Type
Counting Special Characters in a String
Comparing String Characters
try it out 8-1
String Manipulation Examples
Igpay Atinlay
try it out 8-2
Fix My Spelling
try it out 8-3
Unscramble
Scratch Projects
Shoot
try it out 8-4
Binary to Decimal Converter
try it out 8-5
Hangman
try it out 8-7
Fraction Tutor
try it out 8-8
Summary
Problems
Chapter 9: Lists
Lists in Scratch
Creating Lists
try it out 9-1
List Commands
try it out 9-2
Bounds Checking
Dynamic Lists
Filling Lists with User Input
Creating a Bar Chart
try it out 9-3
Numerical Lists
Finding Min and Max
Finding the Average
try it out 9-5
Searching and Sorting Lists
Linear Search
Frequency of Occurrence
try it out 9-6
Bubble Sort
Finding the Median
Scratch Projects
The Poet
try it out 9-8
Quadrilateral Classification Game
try it out 9-9
Math Wizard
Flower Anatomy Quiz
Other Applications
Summary
Problems
Appendix: Sharing and Collaboration
Creating a Scratch Account
Using the Backpack
Creating Your Own Project
Starting a New Project
Remixing a Project
The Project Page
Sharing Your Project
Index
About the Online Resources
Updates
π SIMILAR VOLUMES
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
Scratch is a fun, beginner-friendly programming environment popular in schools around the world. Its playful, intuitive interface uses colorful programming blocks and cartoon sprites to make real programming more approachable.<i>Learn to Program with Scratch</i>shows just how much you can do with Sc
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
Scratch is a fun, beginner-friendly programming environment popular in schools around the world. Its playful, intuitive interface uses colorful programming blocks and cartoon sprites to make real programming more approachable. Learn to Program with Scratch shows just how much you can do with Scratch