Hila Research Centre

Computer Programming

Part 1

Starting Qbasic on your computer.

A computer program is a set of instructions that tell the computer what to do. These instructions must be created in a programming language.

If your computer uses MSDOS you probably have Qbasic, a powerful programming language. At the DOS prompt (C:\>), type qbasic, and the program should start.

If you are using WINDOWS 95/98, you will find Qbasic on the Windows 95/98 CD under D:/other/oldmsdos

A two line program:

Type the command cls then press Enter.

Did you notice that cls changed to CLS? If you had entered cls incorrectly it would not have changed. The commands must be spelled correctly!
CLS is a command that clears the screen.

On the next line type in:
PRINT "Hello, my name is Jane." (Press F5)

Everything between the quotation marks "", appears on the screen as entered.

Your two line program should look like this:

CLS
PRINT "Hello my name is Jane"

Press F5 to run this program.
 

A five line program:

Add three lines (below) to your program, press F5 to run it.
The command SLEEP causes the program to pause for the given number of seconds.

CLS
PRINT "Hello, my name is Jane."
SLEEP 3
CLS
PRINT "Good Bye."

Back to Projects Menu