Contents
Guide
No one likes a know-it-all. Most of us realize theres no such thinghow could there be? The world is far too complicated for someone to understand everything there is to know. So when you come across a know-it-all, you smile to yourself as they rambles on because you know better.
You understand that the quest for knowledge is a never-ending one, and youre okay with that. You have no desire to know everything, just the next thing. You know what you dont know, youre confident enough to admit it, and youre motivated to do something about it.
At Idiots Guides, we, too, know what we dont know, and we make it our business to find out. We find really smart people who are experts in their fields and then we roll up our sleeves and get to work, asking lots of questions and thinking long and hard about how best to pass along their knowledge to you in the easiest, most-accessible way possible.
After all, thats our promiseto make whatever you want to learn As Easy as It Gets. That means giving you a well-organized design that seamlessly and effortlessly guides you from page to page, topic to topic. It means controlling the pace youre asked to absorb new informationnot too much at once but just what you need to know right now. It means giving you a clear progression from easy to more difficult. It means giving you more instructional steps wherever necessary to really explain the details. And it means giving you fewer words and more illustrations wherever its better to show rather than tell.
So here you are, at the start of something new. The next chapter in your quest. It can be an intimidating place to be, but youve been here before and so have we. Clear your mind and turn the page. By the end of this book, you wont be a know-it-all, but your world will be a little less complicated than it was before. And well be sure your journey is as easy as it gets.
Mike Sanders
Publisher, Idiots Guides
This book is dedicated to my wife, Teresa, without whom it would have been done a lot sooner, but life would be a lot less fun.
ALPHA BOOKS
Published by Penguin Group (USA) Inc.
Penguin Group (USA) Inc., 375 Hudson Street, New York, New York 10014, USA Penguin Group (Canada), 90 Eglinton Avenue East, Suite 700, Toronto, Ontario M4P 2Y3, Canada (a division of Pearson Penguin Canada Inc.) Penguin Books Ltd., 80 Strand, London WC2R 0RL, England Penguin Ireland, 25 St. Stephens Green, Dublin 2, Ireland (a division of Penguin Books Ltd.) Penguin Group (Australia), 250 Camberwell Road, Camberwell, Victoria 3124, Australia (a division of Pearson Australia Group Pty. Ltd.) Penguin Books India Pvt. Ltd., 11 Community Centre, Panchsheel Park, New Delhi110 017, India Penguin Group (NZ), 67 Apollo Drive, Rosedale, North Shore, Auckland 1311, New Zealand (a division of Pearson New Zealand Ltd.) Penguin Books (South Africa) (Pty.) Ltd., 24 Sturdee Avenue, Rosebank, Johannesburg 2196, South Africa Penguin Books Ltd., Registered Offices: 80 Strand, London WC2R 0RL, England
Copyright 2014 by Penguin Group (USA) Inc.
All rights reserved. No part of this book may be reproduced, scanned, or distributed in any printed or electronic form without permission. Please do not participate in or encourage piracy of copyrighted materials in violation of the authors rights. Purchase only authorized editions. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of information contained herein. For information, address Alpha Books, 800 East 96th Street, Indianapolis, IN 46240.
IDIOTS GUIDES and Design are trademarks of Penguin Group (USA) Inc.
International Standard Book Number: 978-1-61564-547-3
Library of Congress Catalog Card Number: 2014930955
16 15 14 8 7 6 5 4 3 2 1
Interpretation of the printing code: The rightmost number of the first series of numbers is the year of the books printing; the rightmost number of the second series of numbers is the number of the books printing. For example, a printing code of 14-1 shows that the first printing occurred in 2014.
Printed in the United States of America
Note: This publication contains the opinions and ideas of its author. It is intended to provide helpful and informative material on the subject matter covered. It is sold with the understanding that the author and publisher are not engaged in rendering professional services in the book. If the reader requires personal assistance or advice, a competent professional should be consulted. The author and publisher specifically disclaim any responsibility for any liability, loss, or risk, personal or otherwise, which is incurred as a consequence, directly or indirectly, of the use and application of any of the contents of this book.
Most Alpha books are available at special quantity discounts for bulk purchases for sales promotions, premiums, fund-raising, or educational use. Special books, or book excerpts, can also be created to fit specific needs. For details, write: Special Markets, Alpha Books, 375 Hudson Street, New York, NY 10014.
Publisher:Mike Sanders
Executive Managing Editor:Billy Fields
Senior Acquisitions Editor:Brook Farling
Development Editor:Kayla Dugger
Senior Production Editor:Janette Lynn
Cover Designer:William Thomas
Book Designer:William Thomas
Indexer:Tonya Heard
Layout:Ayanna Lacey
Proofreader:Amy Borrelli
Introduction
Computer programming has become a necessity in todays business world. Programmers, analysts, and designers are in more demand than ever before in history. Whether your goal is to become a professional computer programmer or just to learn how this industry works, this book is for you. It isnt designed for experts and assumes no previous programming experience. Therefore, I make sure to explain to you all those mystical words that computer folks use (such as ROM, RAM, preload, and so forth) and show you how to use that information.
The language I provide you with instructions to use is called Python, like the snake. I chose it because it is easy to write code in and doesnt require an advanced degree to understand. Using this programming language along with the book, you learn how to write little programs to accomplish tasks, as well as how to use the functionality of the language to create reusable components that youor anyone elsecan use in the future.
I wish you the best of luck on your journey into programming!
How This Book Is Organized
Ive divided the book into four major parts: