4 hi.Li. Contents 4 How a computer works 6 Giving the computer instructions 8 Writing programs 10 First words in BASIC 12 Giving the computer information 14 Using INPUT 16 Doing things with PRINT 18 How computers compare things 20 Programs with lots of BASIC 22 Drawing pictures 24 Playing games 26 Making loops 28 Tricks with loops 30 Subroutines 32 Doing things with words 34 Graphs and symbols 36 More graphics 38 Funny poems program 42 Programming tips 44 Puzzle answers 46 BASIC words 48 Going further and Index About this book This isa guide to wnting computer programs 1n BASIC for absolute beginners. BASIC is the language used on most home computers. Itis a way of writing instructions fora computer ina form the computer can understand. You do not need a computer to use this guide, though of course 1t helps you to understand the programs ifyou can try them outon a computer. Different makesof computer use slightly different versions of BASIC. Nearly all the terms in this book, though, will work on most microcomputers, and the few that are not standard are clearly marked. At the beginning there are some guidelines to programminga computer. Then, as you read through the book, the main BASIC wordsare introduced one by one, with short programs to show how they work. s»"soaaai a RAB uomu -. m —— oe some To give you some practice in writing programs there are program puzzles to solve and suggestions for programs to wrile and for useful alterations you can make to the programs In this guide. The answers to the program puzzles are on pages 44-45 At the end of the guide there isa listof BASIC terms and other computer words with bnef explanations. There are also some guidelines to help you write programs, anda list of "bugs' - the mistakes in programs which stop them working - with hints to help you s en "a Ifyou have a micro, try out the programs 1n this guide, then, to find out more about how your micro works, look up the BASIC terms in your manual. You may find that some of the rules given here are not necessary on your micro. The best way to learn BASIC is to try out lotsof programs from books and magazines, thenalter thema little to see what happens. From there you will soon be writing your own programs. -— no - o —e m > TEL VIMI FI VE VI EVI SL EE EEA