Small Basic December 2016 Challenges of the Month!!!


These challenges are intended for people who are learning to program for the first time or for those returning to programming who want to start using Small Basic.  Some will be easy, some will be hard – but they will all make you think, and more importantly be GREAT FUN!

Please post your solutions / partial solutions / questions / feedback etc. into this thread that will remain ‘sticky’ for the month.  The only rule is that your solution must use standard Small Basic methods (no extensions).

It would be good if people could post their problems with these challenges so that a discussion can start so that everyone can learn from each other.

We may extend these challenges over into a second month if solutions and questions are still coming in.

TextWindow Challenges

  • Write a program to read and fill in a text questionnaire.  The questions will be in a text file read by the program.  Each question is presented to the user and the answers read and output to a new file, perhaps a new file for each user questioned.

Example question file:

What is your name?
How old are you?
Where do you live?
What is your star sign?

Example file completed and output by the program:

What is your name?
Fred
How old are you?
18
Where do you live?
New York
What is your star sign?
Gemini

  • Extend the program so that some of the follow-up questions depend on previous answers.  For example, if your age is less than 16 ask where you go to school, or if you are married then ask what your parner’s name is or some other depedent questions.

Graphics Challenges

  • Create a program to draw a sundial clock with a shadow that is correct for the time of day.
  • Create a drawing in the GraphicsWindow of what you can see from your window: skyline, garden, road or whatever.

Music Challenge

  • Write a program to play a karaoke song, with the words highlighted as they are sung.

Math Challenge

  • Write a program to solve a cubic equation and find the 3 roots.  The user enters the 4 coefficients A, B, C, D for the equation Ax^3 + Bx^2 + Cx +D = 0 , and the program finds the 3 solutions for x.

Game Challenge

  • Write a simple 2 player tennis game.  Each player should move along the base line with 2 keys and the ball is returned if they are in place to hit the ball.

Community Suggestions

  • Falling snow (byYLed) – LINK
  • Create a new graphic visual effect (By YLed) – LINK

Do you have an idea for a future challenge? Please post it here!

 

Thank you in advance for contributing, and that’s Small and Basically it!

– Ninja Ed

 

Skip to main content