Bricks be done!

It works!  And I beat the kids to the solution!  Of course they say I cheated by working on it during my prep but I have to get ahead somehow.  I had to do some serious Googling to find a way to get the VB color dialog box to work with Small Basic color commands.  It truly amazes me how many people post information on the internet that makes absolutely no sense unless you already know what you are doing.  One minor glitch is most of the VB color dialog colors do not have equivalents in Small Basic colors.  If an unknown color is selected then the color is black.  I think I will ignore that minor detail.  I have been doing this concentric circle of bricks problem for about thirty years now.  The first time was with Apple Logo on an Apple IIe.  I like the problem because it covers some good topics.  It has graphics, loops, procedures and functions as a minimum.  There is a little math involved which always makes the kids happy.  One of my tests to see if I want to teach with a language in an introductory course is to see how hard it is to program the simple version of this assignment.  Typically I do not include the color requirements.  My final solution for the color requirements had If-then’s, an array for the color names, message boxes requesting a yes/no and a menu bar.  This one problem covered the first eight chapters of the book.  It is less than 100 lines of code so it does not turn into a major typing project for the kids but it does require considerable amount of thought.  There are also a number of very different coding solutions that will accomplish the job.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: