ebook img

Learn to Program with Small Basic: An Introduction to Programming with Games, Art, Science, and Math PDF

444 Pages·2016·23.688 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Learn to Program with Small Basic: An Introduction to Programming with Games, Art, Science, and Math

LEARN TO PROGRAM WITH SMALL BASIC An Introduction to Programming with Games, Art, Science, and Math Majed Marji and Ed Price San Francisco LEARN TO PROGRAM WITH SMALL BASIC. Copyright © 2016 by Majed Marji and Ed Price. 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. 20 19 18 17 16 1 2 3 4 5 6 7 8 9 ISBN-10: 1-59327-702-4 ISBN-13: 978-1-59327-702-4 Publisher: William Pollock Production Editor: Laurel Chun Cover Illustration: Josh Ellingson Developmental Editors: Hayley Baker and Tyler Ortman Technical Reviewer: Vijaye Raji Copyeditor: Anne Marie Walker Compositors: Laurel Chun and Kathleen Miller Proofreader: Lisa Devoto Farrell Indexer: BIM Indexing & Proofreading Services For information on distribution, translations, or bulk sales, please contact No Starch Press, Inc. directly: No Starch Press, Inc. 245 8th Street, San Francisco, CA 94103 phone: 415.863.9900; [email protected]; www.nostarch.com Library of Congress Cataloging-in-Publication Data Names: Marji, Majed, author. | Price, Ed, 1978- author. Title: Learn to program with small basic : an introduction to programming    with games, art, science, and math / by Majed Marji and Ed Price. Description: San Francisco : No Starch Press, [2016] | Includes index. Identifiers: LCCN 2015039128| ISBN 9781593277024 | ISBN 1593277024 Subjects: LCSH: BASIC (Computer program language) Classification: LCC QA76.73.B3 M3743 2016 | DDC 005.1/3--dc23 LC record available at http://lccn.loc.gov/2015039128 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 authors 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. COVERS SMALL BASIC VERSION 1.X. WINDOWS 7 OR HIGHER REQUIRED. ABOUT THE AUTHORS Majed Marji is a senior development engineer at General Motors and an adjunct faculty member at Wayne State University in Michigan. He is also the author of Learn to Program with Scratch (No Starch Press). Ed Price is a senior program manager in engineering at Microsoft. He holds an MBA in technology management and has been a professor at Bellevue College. He runs customer feedback programs for Azure Development, Visual Studio, and Small Basic. BRIEF CONTENTS Foreword by Vijaye Raji Acknowledgments Introduction Chapter 1: Introducing Small Basic Chapter 2: Getting Started Chapter 3: Drawing Basics Chapter 4: Using Variables Chapter 5: Drawing Shapes with Turtle Graphics Chapter 6: Getting User Input Chapter 7: Empowering Programs with Math Chapter 8: Making Decisions with If Statements Chapter 9: Using Decisions to Make Games Chapter 10: Solving Problems with Subroutines Chapter 11: Event-Driven Programming Chapter 12: Building Graphical User Interfaces Chapter 13: Repeating For Loops Chapter 14: Creating Conditional While Loops Chapter 15: Grouping Data in One-Dimensional Arrays Chapter 16: Storing Data with Associative Arrays Chapter 17: Expanding to Higher-Dimension Arrays Chapter 18: Advanced Text Magic Chapter 19: Receiving File Input and Output Where to Go from Here Index CONTENTS IN DETAIL FOREWORD by Vijaye Raji ACKNOWLEDGMENTS INTRODUCTION Who Should Read This Book? What’s in This Book? Online Resources A Note to the Reader 1 INTRODUCING SMALL BASIC What Is a Computer? What Is a Computer Program? What Is Small Basic? The Vision of Small Basic The Basics of Small Basic The Small Basic Language The Small Basic Library The Small Basic Development Environment Installing Small Basic The Small Basic IDE Opening and Saving Your Work Sharing Your Work and Importing Games Copy and Paste; Undo and Redo Running Your Program and Graduating Writing and Running Your First Program Objects and Methods Naming Your Programs Files Generated by Small Basic Helping Hands: IntelliSense and Syntax Coloring Drawing with Small Basic Try It Out 1-1 Programming Challenges 2 GETTING STARTED The Parts of a Program Comments and Statements Characters and Strings Arguments and Methods Try It Out 2-1 Exploring Other Features Case Sensitivity Sequential Execution Displaying Numbers and Doing Math Joining Strings Try It Out 2-2 Object Properties Setting and Changing Property Values Working with Properties Try It Out 2-3 Arithmetic Operators Try It Out 2-4 Programming Errors Syntax Errors Logic Errors Runtime Errors Programming Challenges 3 DRAWING BASICS

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.