Quick Basic Introduction:
Day 1 – Introduction
The goal is to provide a general knowledge of the development environment for DOS based programming. Emphasis will be to understand the concepts of creating and running simple programs.
Topics Covered:
Demonstrations:
Print & Color
print 9
print 5
print "Hello"
print 5 + 9
print "5+9"
print "Hello" + " there!"
print "Hello";
print " there!"
end
Number Variables
a=5
b=3
print "a+b=";
print a+b
c=a-b
print "a-b=";
print c
String Variables
a$="1"
b$="2"
print a$ + b$
Assignments:
Colour Codes
Try the different numbers for the color statement to determine what each colour number does.
Number Adder
Use two variables to store to numbers. Add up the sum of the two numbers and print it out.
Day 2 – Basic Programming Techniques
The goal is to develop and introduce basic programming techniques to read input from a user.
Topics Covered:
Demonstrations:
Input
print "What is your name";
input a$
print "Hello There " + a$
end
Input & Cls
print "What is your name";
input a$
cls
print "Hello there " + a$
end
Variable Errors
print "What is your name";
input a#
cls
print "Hello there " + a#
end
Sleep & Play
play "abcdefg"
sleep 1
play "fgedcba"
Locate
print "What is your name";
input a$
cls
locate 10, 10
print "Hello there " + a$
Assignments:
About Me
Create a program that prompts the user for their name, age, and their favourite hobbies. Print out "<Name>’s favourite hobbies are <hobbies>. <Name> is <age> years old."
Simple Calculator
Read in two numbers as input and then calculate the sum of them and the difference eg. number1+number2 and number1 – number2
Day 3 – Advanced Programming Techniques
The goal is to develop and introduce more advanced techniques used for computer programming such as conditional statements.
Topics Covered:
Demonstrations:
If Statement
print "What is your name";
input a$
if a$="Carman" then
print "hello " + a$
end
ElseIf Statement
print "What is your name";
input a$
if a$="Carman" then
print "hello " + a$
elseif a$="Joe" then
print "hey " + a$
end
Else Statement
print "What is your name";
input a$
if a$="Carman" then
print "hello " + a$
elseif a$="Joe" then
print "hey " + a$
else
print "How are you doing " + a$ + "?"
end
Assignments:
Calculator
Create a calculator that can do adding and subtracting. Ask the user what they would like to do: add or subtract, and then ask for two numbers.
Name Game
Create a simple game that asks for information about a person like their age, name, hobbies, or favourite pastimes. Then based on what they answer, compare this to what you like. eg. if the person says they like basketball and you like basketball too, print "I like basketball too."
Day 4 – Graphics
The goal is to understand how to develop and design simple graphics using Basic.
Topics Covered:
Demonstrations:
Generating Random Numbers
randomize timer
10 x=int (rnd * 6)
print x
goto 10
Pset
randomize timer
screen 13
10 x=int(rnd*320)
y=int(rnd*200)
c=int(rnd*256)
pset(x,y), c
goto 10
Assignments:
Happy Face
Design a program to show a happy face. Get it to randomly change its colours.
Day 5 – Project
The goal is to use the course material and programming concepts you have learned to create a simple program of your choice.
Topics Covered:
Demonstrations:
Previous Classes’ Programs
Assignments:
Program of Your Choice
Finish the program of your choice. You could create a simple game using basic graphics, a choose-your-own-adventure game, or even design a more complicated calculator.