
Learn the fundamentals of programming using Q Basic, a beginner-friendly language with easy syntax, covering variables, data types, logic statements, loops, and graphics that apply across languages.
Choose Cube 64 to convert QBasic code to C++ and run on Windows, Mac, and Linux, because Microsoft stopped including the original QBasic compiler in Windows.
Download the latest stable 64-bit qb64, unzip it, and copy the qb64 folder to a preferred location. Run the qb64 application from its folder to use in this course.
Install QB64 on a Mac by installing Xcode command line tools, downloading the latest QB64 from GitHub, running the setup, and placing QB64 in the Applications folder.
Explore the QB 64 interface, adjust display size, locate the code area and line numbers, run to test programs, save/load, and use the RGV color mixer for colors.
Create your first QBasic program using the print statement to display a hello world string, learn that strings are data, and that programs run top to bottom.
Practice qbasic by writing a two-line program that prints your name and then asks what is your name, illustrating top-to-bottom execution and basic print statements.
Explore syntax errors in QBasic programs, learn how misspellings, misplaced letters, punctuation, capitalization, and spaces trigger errors, and use error messages to fix line one.
Learn how to save qb64 source code in the documents folder, create a Q Basic Files directory, and understand the executable vs. source code.
Turn saved source code into an executable by compiling with qb64, then locate and run the program from the qb64 source folder.
Discover how constants differ from variables and why using a constant like pi prevents typos and aids debugging when calculating a circle's circumference from its diameter.
Learn how to name variables in qbasic by following rules: 1–40 characters, start with a letter, and contain only letters and numbers. Use readable names and apply lower camel case.
Explore an alternative declaration using the dim keyword with an explicit type (integer, string, long). Modern languages favor type-after-name declarations, though symbol-based hints aid debugging in large programs.
Learn how to work with string variables in QBasic by concatenating strings with plus, printing results, and note that numbers can't be used for math inside strings.
Explore basic print statement formatting in QBasic, using commas to create columns, tabulate data like animals by type, and embed variables in strings while managing spaces.
Practice if-then by creating a program that asks about a cat or dog and prints 'Meow' for cat or 'bark' for dog, using end if. Explain it handles cat or dog inputs.
Explore if statements and six comparison operators in qbasic, including equals, less than, greater than, greater than or equal to, less than or equal to, and not equal to.
Use else statements to handle any input outside the desired range, ensuring the program responds with an error or message when a number is not less than 10.
Create a QBasic program that prompts for a pet type, uses an if statement to check for dog, and an else to handle other input.
Learn to use true and false constants in qbasic to create booleans, then apply if statements and a boolean variable to identify a dog person.
Explore how the else-if statement in qbasic controls multiple conditions by ordering comparisons so only one branch executes, using a number-entered stars game as a practical example.
Practice building an else if statement driven guessing game in qbasic, prompting input, comparing against four, and printing feedback like too low, way too high, or you got it.
Learn basic numeric data validation in QBasic by building a grade calculator that validates total points and points correct, then computes and formats a percentage.
Discover how to validate strings in QBasic by converting user input to lowercase with a case function, then apply checks to ensure consistent reading and helpful feedback.
Explore data validation with strings by building a QBasic exercise that prompts to start, accepts yes or no in any case, and handles invalid input with an if statement.
Practice converting a data validation program to use compound logical operators, collapsing the if and related logic into one line for a smaller, still readable, more efficient solution.
Explore the select case statement in QBasic, using case blocks to compare a variable against values and strings, saving time and improving readability compared with if statements.
Showcases a qbasic select case exercise that maps animals to sounds, normalizes input to lowercase, and uses a catchall for unrecognized entries.
Explore the basic math operators in QBasic, including multiplication, division, addition, subtraction, exponentiation, integer division, and modulus, with clear examples.
Discover how order of operators affects math in QBasic, using examples like 2 + 3 * 2 and the use of parentheses to override precedence.
Explore how while loops repeat actions until a condition ends, using a countdown timer, a variable, and sleep between iterations.
Using a while loop, the lecture demonstrates keeping a program running by prompting to continue, converting input to a capital letter, and repeating if the answer is y.
Implement a robust while-loop program with data validation and nested loops to allow repeated grading, clear screen output, and reliable input prompts.
Begin coding with QBasic by building a while loop that prints the numbers 10 through 20, starting at nine and incrementing until the condition is met.
Explore the do loop, including do while and do until, and compare their behavior with while loops; learn when end with loop affects execution and guarantees at least one run.
practice a do loop (or do while loop) in QBasic by prompting for a number and how many times to double it, then multiply by two and print the results.
Learn how the for loop repeats actions a fixed number of times, compare it to the while loop, and see examples like counting to ten and stepping by twos.
Build a QBasic program that prompts the user with 'What would you like?', captures the input, and prints it nine times using a for loop.
Learn how arrays store multiple data items of the same type in one variable, enabling easier management and access of large data sets through dim declarations and position-based retrieval.
Practice creating an integer array of five numbers, print the elements with a for loop, and optionally sum them and display the total.
Enter user inputs into an array with a while loop up to 100 elements, then sum them with a for loop, using data validation and null data handling.
Enter a list of names into a string array, then print them while mastering zero-based indexing and a data-count driven loop to prevent subscript out of range.
Edit the previous exercise to search for strings in an array of names, using uppercase comparisons and data validation to find Lily.
Learn to sort an array from least to greatest using a swap-based brute-force method with nested loops in qbasic.
Convert the number-based program to sort strings, alphabetize an array of names (dog names), and apply the same swapping logic by comparing first letters and then subsequent letters.
Practice preventing duplicate data in an array by validating entries with a true/false flag, checking each new number, and adding only unique values.
Explore a handful of useful math functions in qbasic, including square root and trigonometric functions, and learn to apply them with variables for flexible, efficient code.
Simulate rolling two six-sided dice with a random number generator, sum the results, and tally frequencies in a 12-slot array to reveal bias toward seven.
Edit the previous QBasic program to use one 12-sided die instead of two six-sided dice, and compare probability distributions over 100000 rolls to observe near-equal frequencies.
Explore qbasic string functions, including upper and lower case conversion, character length, spaces and repeats, number-to-string conversion, and substring search with instr and mid$.
Learn to create user defined functions in q basic by declaring a function, passing a number, returning a result like adding two, and saving you from repeating code.
Define a user defined function that computes the hypotenuse using the Pythagorean theorem from two input sides. Pass two variables to the function, return the result, and print it.
Explore subroutines by building a rock, paper, scissors game in QBasic. Manage global and local variables and structure input, display, and winner logic across modules.
Create a guessing game in QBasic using a subroutine to display a win screen, repeatedly prompting the user to guess a random number between 1 and 10.
Explore graphics in QBasic by selecting a screen mode; start with screen 12 for 640 by 480 resolution and 16 colors, or screen 13 for 256 colors but smaller display.
Master color changes in QBasic by using the color command with codes 0–15, printing text in blue and other hues to highlight data and final solutions.
Learn screen coordinates and pixel addressing in qbasic by drawing a pixel at 0,0 on a 640 by 480 grid using piece set and color 14 (yellow).
Create a QBasic program that randomly places 100 pixels on a 640 by 480 screen, using x between 0 and 639 and y between 0 and 479.
Explore drawing in QBasic using line and circle commands, color codes, and paint fill, then create a quick, random circle generator with a for loop to experiment creatively.
Draw a smiley face in qbasic by layering circles for head, eyes, and nose, and shape the mouth with a cut circle and line; adjust coordinates and paint.
Move a yellow circle in QBasic by using inkey in a do loop, with W A S D to update x and y and redraw after clear screen.
Welcome to Beginning Coding Using QBasic. QBasic has been used for decades to teach programing fundamentals due to its low barrier to entry and easy syntax. It is the perfect language to learn first. In this class you will learn the fundamentals that are used in all programing languages. The same logic applies across all languages and QBasic is the easiest way to learn that logic. Once you have mastered QBasic, it is easier to start learning other languages.
In this class we will learn about variables, datatypes, logic statements, loops, graphics, and much, much more. When you are finished you will have the skills you need to quickly learn any programing language. QBasic is a lot of fun to play and learn with.
This class is geared towards the beginner, no prior knowledge of programing is needed. However, it is perfect for someone who wants to review the basics, or just wants to learn the QBasic language. I created this course with homeschool students, traditional school computer labs, and hobbyists in mind, by really, anyone who wants to learn programming will fit right in.
My name is Tim Borkert. I am an Independent Game Developer and Educator. I have been teaching students to program for over 20 years. I’m looking forward to being alongside while you learn how to program.