وبلاگ بلیان

Teach your kids to code : a parent-friendly guide to Python programming

معرفی کتاب «Teach your kids to code : a parent-friendly guide to Python programming» نوشتهٔ by Bryson Payne، منتشرشده توسط نشر No Starch Press در سال 2015. این کتاب در 20 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «Teach your kids to code : a parent-friendly guide to Python programming» در دستهٔ بدون دسته‌بندی قرار دارد.

__Teach Your Kids to Code__ is a parent's and teacher's guide to teaching kids basic programming and problem solving using Python, the powerful language used in college courses and by tech companies like Google and IBM. Step-by-step explanations will have kids learning computational thinking right away, while visual and game-oriented examples hold their attention. Friendly introductions to fundamental programming concepts such as variables, loops, and functions will help even the youngest programmers build the skills they need to make their own cool games and applications. Whether you've been coding for years or have never programmed anything at all, __Teach Your Kids to Code__ will help you show your young programmer how to: * Explore geometry by drawing colorful shapes with Turtle graphics * Write programs to encode and decode messages, play Rock-Paper-Scissors, and calculate how tall someone is in Ping-Pong balls * Create fun, playable games like War, Yahtzee, and Pong * Add interactivity, animation, and sound to their apps __Teach Your Kids to Code__ is the perfect companion to any introductory programming class or after-school meet-up, or simply your educational efforts at home. Spend some fun, productive afternoons at the computer with your kids—you can all learn something! Advance Praise for Teach Your Kids to Code 2 About the Author 9 Brief Contents 11 Contents in Detail 13 Acknowledgments 19 Introduction: What Is Coding and Why Is It Good for Your Kids? 21 Why Should Kids Learn to Code? 22 Coding Is Fun 22 Coding Is a Valuable Job Skill 22 Where Can Kids Learn to Code? 23 How to Use This Book 24 Explore! 24 Do It Together! 25 Online Resources 25 Coding = Solving Problems 26 Chapter 1: Python Basics: Get to Know Your Environment 27 Getting Started with Python 29 1. Download Python 30 2. Install Python 31 3. Test Python with a Program 31 Writing Programs in Python 32 Running Programs in Python 32 What You Learned 33 Programming Challenges 34 #1: Mad Libs 34 #2: More Mad Libs! 35 Chapter 2: Turtle Graphics: Drawing with Python 37 Our First Turtle Program 38 How It Works 39 What Happens 40 Turtle on a Roll 42 Turtle Roundup 43 Adding a Touch of Color 45 A Four-Color Spiral 46 Changing Background Colors 49 One Variable to Rule Them All 51 What You Learned 53 Programming Challenges 53 #1: Changing the Number of Sides 53 #2: How Many Sides? 54 #3: Rubber-Band Ball 54 Chapter 3: Numbers and Variables: Python Does the Math 57 Variables: Where We Keep Our Stuff 58 Numbers and Math in Python 60 Python Numbers 60 Python Operators 61 Doing Math in the Python Shell 62 Syntax Errors: What Did You Say? 63 Variables in the Python Shell 64 Programming with Operators: A Pizza Calculator 65 Strings: The Real Characters in Python 68 Improving Our Color Spiral with Strings 70 Lists: Keeping It All Together 72 Python Does Your Homework 74 What You Learned 76 Programming Challenges 78 #1: Circular Spirals 78 #2: Custom Name Spirals 78 Chapter 4: Loops Are Fun (You Can Say That Again) 79 Building Your Own for Loops 81 Using a for Loop to Make a Rosette with Four Circles 82 Modifying Our for Loop to Make a Rosette with Six Circles 84 Improving Our Rosette Program with User Input 85 Game Loops and while Loops 87 The Family Spiral 90 Putting It All Together: Spiral Goes Viral 94 What You Learned 99 Programming Challenges 100 #1: Spiral Rosettes 100 #2: A Spiral of Family Spirals 101 Chapter 5: Conditions (What If?) 103 if Statements 105 Meet the Booleans 107 Comparison Operators 107 You’re Not Old Enough! 110 else Statements 111 Polygons or Rosettes 112 Even or Odd? 114 elif Statements 117 Complex Conditions: if, and, or, not 118 Secret Messages 121 Messin’ with Strings 122 The Value of Character(s) 123 Our Encoder/Decoder Program 125 What You Learned 127 Programming Challenges 128 #1: Colorful Rosettes and Spirals 128 #2: User-Defined Keys 128 Chapter 6: Random Fun and Games: Go Ahead, Take a Chance! 131 A Guessing Game 132 Colorful Random Spirals 135 Pick a Color, Any Color 136 Getting Coordinated 137 How Big Is Our Canvas? 139 Putting It All Together 140 Rock-Paper-Scissors 142 Pick a Card, Any Card 145 Stacking the Deck 145 Dealing Cards 146 Counting Cards 147 Keeping It Going 149 Putting It All Together 151 Roll the Dice: Creating a Yahtzee-Style Game 152 Setting Up the Game 152 Sorting the Dice 153 Testing the Dice 154 Putting It All Together 155 Kaleidoscope 158 What You Learned 162 Programming Challenges 164 #1: Random Sides and Thickness 164 #2: Realistic Mirrored Spirals 165 #3: War 165 Chapter 7: Functions: There’s a Name for That 167 Putting Things Together with Functions 168 Defining random_spiral() 169 Calling random_spiral() 170 Parameters: Feeding Your Function 172 Smileys at Random Locations 172 Putting It All Together 177 Return: It’s What You Give Back That Counts 179 Returning a Value from a Function 179 Using Return Values in a Program 180 A Touch of Interaction 183 Handling Events: TurtleDraw 184 Listening for Keyboard Events: ArrowDraw 186 Handling Events with Parameters: ClickSpiral 189 Taking It One Step Further: ClickandSmile 192 ClickKaleidoscope 194 The draw_kaleido() Function 194 The draw_spiral() Function 195 Putting It All Together 196 What You Learned 198 Programming Challenges 199 #1: Mirrored Smileys 199 #2: More Ping-Pong Calculations 199 #3: A Better Drawing Program 199 Chapter 8: Timers and Animation: What Would Disney Do? 201 Getting All GUI with Pygame 202 Drawing a Dot with Pygame 203 What’s New in Pygame 206 The Parts of a Game 207 Timing It Just Right: Move and Bounce 211 Moving a Smiley 212 Animating a Smiley with the Clock Class 214 Bouncing a Smiley Off a Wall 216 Bouncing a Smiley Off Four Walls 223 What You Learned 227 Programming Challenges 229 #1: A Color-Changing Dot 229 #2: 100 Random Dots 229 #3: Raining Dots 231 Chapter 9: User Interaction: Get into the Game 233 Adding Interaction: Click and Drag 234 Clicking for Dots 234 Dragging to Paint 237 Advanced Interaction: Smiley Explosion 241 Smiley Sprites 241 Setting Up Sprites 244 Updating Sprites 246 Bigger and Smaller Smileys 247 Putting It All Together 248 SmileyPop, Version 1.0 250 Detecting Collisions and Removing Sprites 250 Putting It All Together 252 What You Learned 253 Programming Challenges 254 #1: Randomly Colored Dots 254 #2: Painting in Colors 255 #3: Throwing Smileys 255 Chapter 10: Game Programming: Coding for Fun 257 Building a Game Skeleton: Smiley Pong, Version 1.0 258 Drawing a Board and Game Pieces 260 Keeping Score 261 Showing the Score 267 Putting It All Together 269 Adding Difficulty and Ending the Game: Smiley Pong, Version 2.0 271 Game Over 272 Play Again 272 Faster and Faster 273 Putting It All Together 276 Adding More Features: SmileyPop v2.0 278 Adding Sound with Pygame 278 Tracking and Displaying Player Progress 280 Putting It All Together 283 What You Learned 286 Programming Challenges 287 #1: Sound Effects 287 #2: Hits and Misses 288 #3: Clear the Bubbles 288 Appendix A: Python Setup for Windows, Mac, and Linux 289 Python for Windows 290 Download the Installer 290 Run the Installer 291 Try Out Python 295 Python for Mac 297 Download the Installer 297 Run the Installer 298 Try Out Python 301 Python 3 for Linux 302 Appendix B: Pygame Setup for Windows, Mac, and Linux 305 Pygame for Windows 306 Pygame for Mac 310 Python 2.7 and Pygame 1.9.2 310 Pygame for Linux 313 Pygame for Python 2 on Linux 313 Appendix C: Building Your Own Modules 315 Building the colorspiral Module 316 Using the colorspiral Module 317 Reusing the colorspiral Module 318 Additional Resources 320 Glossary 321 Index 327 Updates 335 What Is Coding And Why Is It Good For Your Kids? -- Python Basics : Get To Know Your Environment -- Turtle Graphics : Drawing With Python -- Numbers And Variables : Python Does The Math -- Loops Are Fun (you Can Say That Again) -- Conditions (what If?) -- Random Fun And Games : Go Ahead, Take A Chance! -- Functions : There's A Name For That -- Timers And Animation : What Would Disney Do? -- User Interaction : Get Into The Game -- Game Programming : Coding For Fun. By Bryson Payne. Includes Index. Place Of Publication Taken From Publisher's Website. What is coding? Python basics Turtle graphics Numbers and variables Loops are fun Conditions Random fun Functions Timers and animation User interaction Game programming Beyond the book Python setup for PC and Mac Pygame setup Building your own modules Solutions to programming challenges. "A guide to teaching basic programming skills for parents and teachers, with step-by-step explanations, visual examples, and exercises. Covers programming concepts including loops, lists, functions, and variables, and how to build games and applications"-- Provided by publisher
دانلود کتاب Teach your kids to code : a parent-friendly guide to Python programming