Qbasicnews.com

Full Version: Practice programs
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Does anyone know a site where theres practice problems for qbasic? I've been trying to think of some things to program but most of them have been to hard for me to do.
I don't know of any, but if you say what sort of thing you want to be tested on and what sort of level of QB knowelege you have I'm sure other people and myself could whip up a few n00b challenges Smile
One suggestion I have...if you are in school...is to write programs that (calculate, plot, show, demonstrate, etc.) what you are learning in your math or science classes.

eg...if you are in trig, make a program that plots the trig functions. You will quickly learn that you have to add a bunch of parameters to get it to scale correctly. If this is too easy/advanced for you, pick something else...

Have fun.

I just wrote the following (2 min) for you...I'm trying to learn C++ and forgot what a pleasure it is working in QB!!!!

I sure wish there were a 32-bit QB compiler with unsigned data-types that would work with windows...

Code:
SCREEN 11
yoffset = 240

DO

INPUT "Scale factor(try 50)"; sf

FOR x = 0 TO 640 / sf STEP 1 / sf
PSET (x * sf, sf * SIN(x) + yoffset)
NEXT x

LOOP
DVAlan,
You could take a look at some of the challenges here. Some contain problems which could be considered good practice problems. Some also have some pretty exotic solutions too.
*****
If yau want some really simple chalenges you could try things like:
checking a string to see if its a palindrome (a word/phrese that reads the same backwards or forwards. e.g. madam, nurses run)
I'll give those a try, sounds interesting especially something to work with trig functions Smile