Python for Kids

Only available on StudyMode
  • Download(s) : 30
  • Published : April 7, 2013
Open Document
Text Preview
PYTHON
FO R K I D S
Jason R. Briggs

A P l ay f u l I n t r o d u c t i o n to P r o g r a m m i n g

Python for Kids

Python
for Kids
A P l ay fu l I n t r o d u c t i o n to P r o g r a m m i n g

B y Ja s o n R . B r i g g s

San Francisco

PYTHON FOR KIDS. Copyright © 2013 by Jason R. Briggs. All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. First printing 16 15 14 13 12 123456789

ISBN-10: 1-59327-407-6 ISBN-13: 978-1-59327-407-8 Publisher: William Pollock Production Editor: Serena Yang Cover and Interior Design: Octopod Studios Illustrator: Miran Lipovaca Developmental Editor: William Pollock Technical Reviewers: Josh Pollock and Maria Fernandez Copyeditor: Marilyn Smith Compositor: Serena Yang Proofreader: Greg Teague For information on book distributors or translations, please contact No Starch Press, Inc. directly: No Starch Press, Inc. 38 Ringold Street, San Francisco, CA 94103 phone: 415.863.9900; fax: 415.863.9950; info@nostarch.com; http://www.nostarch.com/ Library of Congress Cataloging-in-Publication Data A catalog record of this book is available from the Library of Congress. No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.

BRIef Contents
About the Author, Illustrator, and Technical Reviewers . . . . . . . . . . . . . . . xv Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix

Part I: Learning to Program
Chapter 1: Not All Snakes Slither . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Chapter 2: Calculations and Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Chapter 3: Strings, Lists, Tuples, and Maps. . . . . . . . . . . . . . . . . . . . . . . . . 25 Chapter 4: Drawing with Turtles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Chapter 5: Asking Questions with if and else . . . . . . . . . . . . . . . . . . . . . . . . 53 Chapter 6: Going Loopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Chapter 7: Recycling Your Code with Functions and Modules . . . . . . . . . . 81 Chapter 8: How to Use Classes and Objects . . . . . . . . . . . . . . . . . . . . . . . . . 93 Chapter 9: Python’s Built-in Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Chapter 10: Useful Python Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 Chapter 11: More Turtle Graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Chapter 12: Using tkinter for Better Graphics . . . . . . . . . . . . . . . . . . . . . . 163

Part II: Bounce!
Chapter 13: Beginning Your First Game: Bounce! . . . . . . . . . . . . . . . . . . . 193 Chapter 14: Finishing Your First Game: Bounce! . . . . . . . . . . . . . . . . . . . 205

Part III: Mr. stick Man Races for the exit
Chapter 15: Creating Graphics for the...
tracking img