Muutke küpsiste eelistusi

Teach Your Kids to Code [Pehme köide]

  • Formaat: Paperback / softback, 336 pages, kõrgus x laius: 234x178 mm
  • Ilmumisaeg: 01-Apr-2015
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1593276141
  • ISBN-13: 9781593276140
  • Formaat: Paperback / softback, 336 pages, kõrgus x laius: 234x178 mm
  • Ilmumisaeg: 01-Apr-2015
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1593276141
  • ISBN-13: 9781593276140
A parent and teacher's guide to basic Python programming offers step-by-step instructions for using the Turtle module, understanding Python syntax and developing playable games. Original.

Teach Your Kids to Code is a parent and teacher's guide to teaching basic programming and problem-solving skills. Together with your kids, you'll learn how to program in Python, the popular and powerful language that's used in college computer science courses and tech companies worldwide, like Google and IBM. But because it's easy to learn, Python makes a great first programming language for kids, too.

Filled with visual and game-oriented examples to hold a young programmer's attention,Teach Your Kids to Code has step-by-step explanations that will have kids learning computational thinking concepts in no time flat. You'll explore geometry using the Turtle module, learn Python's syntax, then build fun, playable games, like Yahtzee, War, and Pong.

With fun, friendly explanations of "complicated" programming concepts like loops, lists, functions, and variables, the book slowly ramps up to the point where you'll be able to make your own cool games and applications.

Teach Your Kids to Code is the perfect companion to an introductory programming class or your after school meet-up. Have a fun (and educational!) afternoon at the computer with your kids.

Arvustused

A straightforward, crystal-clear guide to programming in Python...Sophisticated concepts and serious programming make for an easy, enjoyable game for families. Kirkus Reviews

An easy five stars . . . With the information provided in Teach Your Kids to Code, kids (and adults) will have a solid foundation from which to jump to more advanced programming books. James Floyd Kelly, GeekDad

Kid coders who have mastered the likes of Scratch, or older students who are math inclined and want to learn how to code, will find a worthy choice in Paynes guide to Python programming. School Library Journal

The text is clear, the graphics are engaging, and the apps are awesome. This is the programming guide for parents and kids to enjoy together. Aaron Walker, Cybersecurity Expert, NASA

Every child on the planet should have this book, and so should every parent. James E. Daniel, Jr., Founder, App Studios, LLC



The kind of book I wish Id had as a kid. Scott Hand, Software Engineer, CareerBuilder

Acknowledgments xix
Introduction What Is Coding And Why Is It Good For Your Kids? xxi
Why Should Kids Learn to Code? xxii
Coding Is Fun xxii
Coding Is a Valuable Job Skill xxii
Where Can Kids Learn to Code? xxiii
How to Use This Book xxiv
Explore! xxiv
Do It Together! xxv
Online Resources xxv
Coding = Solving Problems xxvi
1 Python Basics: Get To Know Your Environment
1(10)
Getting Started with Python
3(3)
1 Download Python
4(1)
2 Install Python
5(1)
3 Test Python with a Program
5(1)
Writing Programs in Python
6(1)
Running Programs in Python
6(1)
What You Learned
7(1)
Programming Challenges
8(3)
#1 Mad Libs
8(1)
#2 More Mad Libs!
9(2)
2 Turtle Graphics: Drawing With Python
11(20)
Our First Turtle Program
12(4)
How It Works
13(1)
What Happens
14(2)
Turtle on a Roll
16(1)
Turtle Roundup
17(2)
Adding a Touch of Color
19(6)
A Four-Color Spiral
20(3)
Changing Background Colors
23(2)
One Variable to Rule Them All
25(2)
What You Learned
27(1)
Programming Challenges
27(4)
#1 Changing the Number of Sides
27(1)
#2 How Many Sides?
28(1)
#3 Rubber-Band Ball
28(3)
3 Numbers And Variables: Python Does The Math
31(22)
Variables: Where We Keep Our Stuff
32(2)
Numbers and Math in Python
34(8)
Python Numbers
34(1)
Python Operators
35(1)
Doing Math in the Python Shell
36(1)
Syntax Errors: What Did You Say?
37(1)
Variables in the Python Shell
38(1)
Programming with Operators: A Pizza Calculator
39(3)
Strings: The Real Characters in Python
42(2)
Improving Our Color Spiral with Strings
44(2)
Lists: Keeping It All Together
46(2)
Python Does Your Homework
48(2)
What You Learned
50(2)
Programming Challenges
52(1)
#1 Circular Spirals
52(1)
#2 Custom Name Spirals
52(1)
4 Loops Are Fun (You Can Say That Again)
53(24)
Building Your Own for Loops
55(4)
Using a for Loop to Make a Rosette with Four Circles
56(2)
Modifying Our for Loop to Make a Rosette with Six Circles
58(1)
Improving Our Rosette Program with User Input
59(2)
Game Loops and while Loops
61(3)
The Family Spiral
64(4)
Putting It All Together: Spiral Goes Viral
68(5)
What You Learned
73(1)
Programming Challenges
74(3)
#1 Spiral Rosettes
74(1)
#2 A Spiral of Family Spirals
75(2)
5 Conditions (What If?)
77(28)
If Statements
79(2)
Meet the Booleans
81(4)
Comparison Operators
81(3)
You're Not Old Enough!
84(1)
Else Statements
85(6)
Polygons or Rosettes
86(2)
Even or Odd?
88(3)
Elif Statements
91(1)
Complex Conditions: if, and, or, not
92(3)
Secret Messages
95(6)
Messin' with Strings
96(1)
The Value of Character(s)
97(2)
Our Encoder/Decoder Program
99(2)
What You Learned
101(1)
Programming Challenges
102(3)
#1 Colorful Rosettes and Spirals
102(1)
#2 User-Defined Keys
102(3)
6 Random Fun And Games: Go Ahead, Take A Chance!
105(36)
A Guessing Game
106(3)
Colorful Random Spirals
109(7)
Pick a Color, Any Color
110(1)
Getting Coordinated
111(2)
How Big Is Our Canvas?
113(1)
Putting It All Together
114(2)
Rock-Paper-Scissors
116(3)
Pick a Card, Any Card
119(7)
Stacking the Deck
119(1)
Dealing Cards
120(1)
Counting Cards
121(2)
Keeping It Going
123(2)
Putting It All Together
125(1)
Roll the Dice: Creating a Yahtzee-Style Game
126(6)
Setting Up the Game
126(1)
Sorting the Dice
127(1)
Testing the Dice
128(1)
Putting It All Together
129(3)
Kaleidoscope
132(4)
What You Learned
136(2)
Programming Challenges
138(3)
#1 Random Sides and Thickness
138(1)
#2 Realistic Mirrored Spirals
139(1)
#3 War
139(2)
7 Functions: There's A Name For That
141(34)
Putting Things Together with Functions
142(4)
Defining random_spiral()
143(1)
Calling random-spiral()
144(2)
Parameters: Feeding Your Function
146(7)
Smileys at Random Locations
146(5)
Putting It All Together
151(2)
Return: It's What You Give Back That Counts
153(4)
Returning a Value from a Function
153(1)
Using Return Values in a Program
154(3)
A Touch of Interaction
157(11)
Handling Events: TurtleDraw
158(2)
Listening for Keyboard Events: ArrowDraw
160(3)
Handling Events with Parameters: ClickSpiral
163(3)
Taking It One Step Further: ClickandSmile
166(2)
ClickKaleidoscope
168(4)
The draw_kaleido() Function
168(1)
The draw_spiral() Function
169(1)
Putting It All Together
170(2)
What You Learned
172(1)
Programming Challenges
173(2)
#1 Mirrored Smileys
173(1)
#2 More Ping-Pong Calculations
173(1)
#3 A Better Drawing Program
173(2)
8 Timers And Animation: What Would Disney Do?
175(32)
Getting All GUI with Pygame
176(9)
Drawing a Dot with Pygame
177(3)
What's New in Pygame
180(1)
The Parts of a Game
181(4)
Timing It Just Right: Move and Bounce
185(16)
Moving a Smiley
186(2)
Animating a Smiley with the Clock Class
188(2)
Bouncing a Smiley Off a Wall
190(7)
Bouncing a Smiley Off Four Walls
197(4)
What You Learned
201(2)
Programming Challenges
203(4)
#1 A Color-Changing Dot
203(1)
#2 100 Random Dots
203(2)
#3 Raining Dots
205(2)
9 User Interaction: Get Into The Game
207(24)
Adding Interaction: Click and Drag
208(7)
Clicking for Dots
208(3)
Dragging to Paint
211(4)
Advanced Interaction: Smiley Explosion
215(9)
Smiley Sprites
215(3)
Setting Up Sprites
218(2)
Updating Sprites
220(1)
Bigger and Smaller Smileys
221(1)
Putting It All Together
222(2)
SmileyPop, Version 1.0
224(3)
Detecting Collisions and Removing Sprites
224(2)
Putting It All Together
226(1)
What You Learned
227(1)
Programming Challenges
228(3)
#1 Randomly Colored Dots
228(1)
#2 Painting in Colors
229(1)
#3 Throwing Smileys
229(2)
10 Game Programming: Coding For Fun
231(32)
Building a Game Skeleton: Smiley Pong, Version 1.0
232(13)
Drawing a Board and Game Pieces
234(1)
Keeping Score
235(6)
Showing the Score
241(2)
Putting It All Together
243(2)
Adding Difficulty and Ending the Game: Smiley Pong, Version 2.0
245(7)
Game Over
246(1)
Play Again
246(1)
Faster and Faster
247(3)
Putting It All Together
250(2)
Adding More Features: SmileyPop v2.0
252(8)
Adding Sound with Pygame
252(2)
Tracking and Displaying Player Progress
254(3)
Putting It All Together
257(3)
What You Learned
260(1)
Programming Challenges
261(2)
#1 Sound Effects
261(1)
#2 Hits and Misses
262(1)
#3 Clear the Bubbles
262(1)
A Python Setup For Windows, Mac, And Linux
263(16)
Python for Windows
264(7)
Download the Installer
264(1)
Run the Installer
265(4)
Try Out Python
269(2)
Python for Mac
271(5)
Download the Installer
271(1)
Run the Installer
272(3)
Try Out Python
275(1)
Python for Linux
276(3)
B Pygame Setup For Windows, Mac, And Linux
279(10)
Pygame for Windows
280(4)
Pygame for Mac
284(3)
Python 2.7 and Pygame 1.9.2
284(3)
Pygame for Linux
287(2)
Pygame for Python 2
287(2)
C Building Your Own Modules
289(6)
Building the colorspiral Module
290(4)
Using the colorspiral Module
291(1)
Reusing the colorspiral Module
292(2)
Additional Resources
294(1)
Glossary 295(6)
Index 301
Bryson Payne is the Department Head of Computer Science at the University of North Georgia. He has taught computer science at the university level for over 15 years, and he previously taught middle-school math and programming.