locked
Challenge of the Month - September 2014 RRS feed

  • General discussion

  • 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.

    Also post feedback on the kind of challenges that you want to see more of in the future.

    Big Challenge

    Text Challenge

    • Write a program to read and write an array of Small Basic data to and from a csv file.

    Variable Type Challenge

    • Write a program that checks a Small Basic variable and determines if it is an array or not:
    • If it is an array, then the number of elements is reported
    • If it is not an array, then it is checked to see if it is a number or not
    • If it is a number, then it is determined if it is positive or negative and if it is an integer or decimal number

    Graphics Challenge 1

    Draw a flower.

    Graphics Challenge 2

    Draw a traffic light that changes through the correct lighting sequence, perhaps using the Timer object.


    Game Challenge

    Write a simple stick mad fighting game.  see some recent posts for some ideas on this.

    Community Suggestions (by Nonki)

    • Write a program to find an absolute path from an input relative path.  While it is assumed that the current path is Program.Directory.

    For example, if the current directory is "C:\Users\Nonki\Documents",

    Input ".." → Output "C:\Users\Nonki"
    Input "test" → Output C:\Users\Nonki\Documents\test"

    • Draw (or fill) a Trapezoid.
    • Make a kitchen timer.


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



    Monday, September 1, 2014 6:07 PM

All replies

  • My solution for Community Suggestions (by Nonki) to find an absolute path from an input relative path.

    Unfortunately File.GetFiles and .GetFolders don't convert results to abs. paths and this is rather laborious ID: XRD223. Just for fun my prefered solution would be ID: PMW940 (which uses wonderfull LDInline  from LitDev Extension).



    Monday, September 1, 2014 6:58 PM
    Answerer
  • My traffic light is KZP715.


    A traffic light System BPG098



    • Edited by martmen Friday, September 5, 2014 8:58 PM
    Monday, September 1, 2014 9:25 PM
  • traffic light  MNZ607

    *Note Japanese traffic signal colors are Red,Yellow and Blue ( green+blue)


    Tuesday, September 2, 2014 6:08 AM
    Answerer
  • Probably some of the worst graphics in any Small Basic game, but here is the basics of a stick man fighter game.

    Import VNG363.

    Enjoy and maybe improve it...

    Wednesday, September 3, 2014 9:57 PM
  • These are my challenges for graphics challenge 1: 

    Cosmos JTK247

    Screen shot of a program Cosmos

    Sun Flower KCG090-0

    Screen shot of a program Sun Flower


    Nonki Takahashi




    Friday, September 5, 2014 8:51 AM
  • This is my sample for community suggestion 2 by Nonki.

    I found this in a thread http://social.msdn.microsoft.com/Forums/en-US/706852bd-957b-4ff1-93ea-069ed026f843/calculation-of-geometric-figures-and-their-graphs?forum=smallbasic .

    I wrote a program XQF852-1 for trapezoid.
    Upper base should be less equal than lower base for this program.


    Nonki Takahashi



    Saturday, September 6, 2014 7:10 AM
  • My Graphics Challenge 2 - Traffic Light program is: DHK287

    I use the exemple picture, use controls buttons and added a sleep mode.

    Sunday, September 7, 2014 12:47 AM
  • Probably some of the worst graphics in any Small Basic game, but here is the basics of a stick man fighter game.

    Import VNG363.

    Enjoy and maybe improve it...


    This is hilarious! Great job!

    Ed Price, Azure & Power BI Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

    Answer an interesting question? Create a wiki article about it!

    Sunday, September 7, 2014 8:44 AM
  • @electroluis - great idea masking the image - works well.
    Sunday, September 7, 2014 8:45 AM
  • Text Challenge   CSV file treatment   FHR251 

    This program gets Stock CSV data from  Google-Finance  and  save its , gets average "close" data.

      Graphic version RVF728-1

    Sunday, September 7, 2014 9:55 AM
    Answerer
  • Nonki, I love the flowers.  Very cleverly done!

    Jerry

    Monday, September 8, 2014 1:21 AM
  • Nonki, I love the flowers.  Very cleverly done!

    Jerry

    Thanks, Jerry.

    Nonki Takahashi

    Monday, September 8, 2014 2:35 PM
  • This is my first step for the sample of community suggestion 3 by Nonki: GQF135.

    Screen shot of a program Kitchen Timer 0.1a


    Nonki Takahashi

    Monday, September 15, 2014 12:38 PM
  • This is my sample for community suggestion 1 by Nonki: JQK779.

    Nonki Takahashi

    Tuesday, September 16, 2014 3:06 AM
  • Too fast?  These are ideas for a future challenge:

    1. Make a TODO list management program.
    2. Draw (or fill) a pentagon.
    3. Make a Sunrise Animation.

    Nonki Takahashi

    Thursday, September 18, 2014 1:24 AM
  • My flower program

    LZF101


    Alex Warrington - alex.warrington@live.co.uk

    Friday, September 19, 2014 11:12 PM
  • My flower program

    LZF101


    Alex Warrington - alex.warrington@live.co.uk

    Alex, beautiful!

    Screen shot of a program drawing flowers


    Nonki Takahashi

    Saturday, September 20, 2014 12:49 AM
  • This is another challenge for graphics challenge 1: BQX534.

    Hydrangea
    Screen shot of a program Hydrangea


    Nonki Takahashi

    Saturday, September 27, 2014 10:06 AM