9798886067927 Flipbook PDF


4 downloads 117 Views 9MB Size

Recommend Stories


Porque. PDF Created with deskpdf PDF Writer - Trial ::
Porque tu hogar empieza desde adentro. www.avilainteriores.com PDF Created with deskPDF PDF Writer - Trial :: http://www.docudesk.com Avila Interi

EMPRESAS HEADHUNTERS CHILE PDF
Get Instant Access to eBook Empresas Headhunters Chile PDF at Our Huge Library EMPRESAS HEADHUNTERS CHILE PDF ==> Download: EMPRESAS HEADHUNTERS CHIL

Story Transcript

The Fundamentals OF GW-BASIC PROGRAMMING From Simple Programs to Loops and Strings

PRITMA JASHNANI

Copyrigh t© Pritma Jashnani All Rights Reserved. ISBN 979-888606792-7 This book has been published with all reasonable efforts taken to make the material error-free after the consent of the author. No part of this book shall be used, reproduced in any manner whatsoever without written permission from the author, except in the case of brief quotations embodied in critical articles and reviews. The Author of this book is solely responsible and liable for its content including but not limited to the views, representations, descriptions, statements, information, opinions and references [“Content”]. The Content of this book shall not constitute or be construed or deemed to reflect the opinion or expression of the Publisher or Editor. Neither the Publisher nor Editor endorse or approve the Content of this book or guarantee the reliability, accuracy or completeness of the Content published herein and do not make any representations or warranties of any kind, express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose. The Publisher and Editor shall not be liable whatsoever for any errors, omissions, whether such errors or omissions result from negligence, accident, or any other cause or claims for loss or damages of any kind, including without limitation, indirect or consequential loss or damage arising out of use, inability to use, or about the reliability, accuracy or sufficiency of the information contained in this book.

Dedicated to the Students and Teachers who want to make their Fundamentals in GW-BASIC clear.

Contents About the Author..................................................................................................................................... xi Preface ....................................................................................................................................................xiv Acknowledgments .................................................................................................................................. xv CHAPTER 1 ................................................................................................................................................ 1 INTRODUCTION TO BASIC ........................................................................................................................ 1 VARIABLES ............................................................................................................................................ 3 DATATYPES ........................................................................................................................................... 4 OPERATORS IN GWBASIC ..................................................................................................................... 5 PROGRAMMING TIME !!!......................................................................................................... 5 ____________________________________________ .................................. 5 HOW TO RUN A PROGRAM ON GWBASIC ......................................................................................... 10 Summary ............................................................................................................................................. 11 EXERCISES BASED ON CHAPTER 1 ........................................................................................... 12 EXERCISES FOR YOU............................................................................................................................ 13 Fill in the blanks .................................................................................................................................. 13 PROGRAMS PRACTICE ........................................................................................................................ 14 GIVE OUTPUT ...................................................................................................................................... 15 CORRECT THE PROGRAMS.................................................................................................................. 15 CHAPTER 2 .............................................................................................................................................. 17 DECISION MAKING IN BASIC .................................................................................................................. 17 IF THEN statement .............................................................................................................................. 17 IF THEN ELSE........................................................................................................................................ 19 SUMMARY........................................................................................................................................... 24 EXERCISES BASED ON CHAPTER 2 .......................................................................................................... 25 Give output ......................................................................................................................................... 28 CHAPTER 3 .............................................................................................................................................. 31 LOOPING STATEMENTS IN BASIC ........................................................................................................... 31

CONTENTS

While Wend ........................................................................................................................................ 31 EXERCISES BASED ON CHAPTER 3 .......................................................................................................... 42 GIVE OUTPUTS .................................................................................................................................... 42 Questions on Programming ............................................................................................................... 44 CHAPTER 4 .............................................................................................................................................. 47 LOOPING STATEMENTS .......................................................................................................................... 47 (FOR NEXT).............................................................................................................................................. 47 FOR NEXT ............................................................................................................................................ 47 SUMMARY .......................................................................................................................................... 54 EXERCISE BASED ON CHAPTER 4 ............................................................................................................ 56 Give output ......................................................................................................................................... 56 PROGRAMS TO PRACTICE .................................................................................................................. 57 CHAPTER 5 .............................................................................................................................................. 59 NESTED LOOPS........................................................................................................................................ 59 EXERCISES BASED ON CHAPTER 5 .......................................................................................................... 65 Programs............................................................................................................................................. 66 CORRECT THE FOLLOWING PROGRAMS AND REWRITE ..................................................................... 67 FILL IN THE BLANKS ............................................................................................................................ 68 CHAPTER 6 ....................................................................................................................................... 70 STRINGS MANIPULATION ....................................................................................................... 70 PROGRAM TIME !!! ................................................................................................................... 71 SUMMARY .......................................................................................................................................... 79 CHAPTER 7 .............................................................................................................................................. 80 SOME FUNCTIONS GIVEN BY BASIC ....................................................................................................... 80 EXERCISES BASED ON CHAPTER 6 AND CHAPTER 7 .............................................................................. 82 Write Statements for the following .................................................................................................. 82 Give output ......................................................................................................................................... 83 FILL IN THE BLANKS ............................................................................................................................ 83 CORRECT THE FOLLOWING ................................................................................................................ 84 Write Programs .................................................................................................................................. 85 ABOUT THE CENTRE ................................................................................................................................ 89

viii

About the Author Pritma Jashnani, is the head of Centre of Computer Technology, Lucknow, who has taught several students so far in her career of 25 years. She has taught more than 3000+ students who are now successfully placed in top companies. She has a unique style of teaching. She believes in quality education rather than increasing quantity of students. She has been teaching courses like Java, Website Designing, Data Structures, Python, Android and a lot more to B.Tech, MCA and BCA students. 13 years back, she started writing books for her students so that they do not find any difficulty in the topics they are taught. She took a lot of time doing research and picking questions from the exam papers of various schools and compiling them into set of two both for class 10th and 12th. Study Material and Exercise book. She has also written books on ASP.NET, PHP, PYTHON, Core Java, C#, Advanced Java, Oracle etc. This book has been made to guide students studying in class VI, VII AND VIII. This can also be of help to Teachers who are teaching Basic at Schools. Hope you like this book as it will encourage her to write more books for you. For Joining any courses ,you can contact her by sending mail on [email protected] You can even buy any study materials on Java, ANDROID, ASP.NET, C,C++,C#,PHP etc.

Preface When Programming starts at Schools, Children are first taught LOGO, Scratch and BASIC .Since BASIC is the first step to learn decision making statements and looping .This book has given step by step guide to the students. The Commands to be used in GW-BASIC have been explained. All chapters are backed by syntax and examples of various Programs, with questions and solutions to every program. Every Chapter is followed by exercises based on those Chapters, so that students can try those questions and run on their Systems. I have also given a Chapter on Strings and various functions of GW-BASIC which will help students learn the various types of Programs on these topics. While solving exercises, if you do find difficulty, please mail on the email address [email protected] PRITMA JASHNANI (Head of Centre of Computer Technology)

xiv

Acknowledgments I express my sincere gratitude to my late mother, late brother, my father and my sisters, without whom it was not possible to express my thoughts in the form of words written in this book. Though my mother is not with us, but her blessings and love always remains with us. She had a belief that one day I will be writing books and become an author. I also express my gratitude to my mentor Inspiring Jatin under whose guidance, I could actually make my wish of becoming an author come true.

Get in touch

Social

© Copyright 2013 - 2024 MYDOKUMENT.COM - All rights reserved.