Programmed Lessons in QBasic

This is a gentle introduction to programming using the computer programming language QBasic (sometimes called QBasic). This introduction is used for a course in computer literacy for students of all majors. Its goal is to show what programming is about using the fundamental features of QBasic.

These are interactive lessons. Each chapter consists of about 20 web pages, and is about the equivalent of one classroom lecture. At the bottom of each page is a question on the material on that page. Answer the question before moving on to the next page.

Nobody learns programming just by reading. Copy the example programs into QBasic, run them, modify them, and play with them. Details on how to do this are in the lessons. With the guidance of these notes, you can use QBasic itself as an interactive "teaching machine". This is very effective.

chapter 00PREFACE
chapter 01Small Programs
chapter 02Arithmetic Expressions
chapter 03Variables
chapter 04The INPUT Statement
chapter 05Beginning Graphics
chapter 06Loops
chapter 07More about Loops
chapter 08Example Programs with Loops
chapter 09Loop Conditions
chapter 10Decision Making
chapter 11Single-branch IF Statements
chapter 12Logical Expressions
chapter 13String Variables
chapter 14Creating Large Programs
chapter 15More about Program Structure
chapter 16Practice with Program Construction
chapter 17Decisions
chapter 18Many-way Decisions
chapter 19FOR Loops
chapter 20Further about the FOR Statement
chapter 21Nested Loops, and Graphics
chapter 22Arrays
chapter 23Arrays of Numbers
chapter 24Arrays and Loops
chapter 25File Output
chapter 26File Input
Appendix A Installing QBasic
Appendix B Running QBasic