locked
Challenge of the Month - March 2015 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.

    Text Challenges

    • Write a program to CAPITALISE the first letter of each word in a sentence.
    • Write a program the center some text in the GraphicsWindow or in the TextWindow.


    Graphics Challenge

    • Write a program to draw a spriagraph picture.


    Image result for spirograph

    Math Challenges

    • Write a program to validate a credit card number, see this link.
    • Write an equation solver that can solve the following two simultaneous equations for x an y when the user enters the coefficients A, B, C and D, E, F.


    Ax + By = C and Dx + Ey = F

    Game Challenge

    • Write a battleships game.  You will need to consider how it will work with 2 players or play against the computer.



    Community Suggestion (By Nonki)

    • Draw a picture of doll[s].


    Community Suggestion (By Coding Cat)

    • Easy: A real time countdown lock.
    • Hard: Using the countdown clock as a theme for a game.


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

    • Edited by litdev Saturday, February 28, 2015 9:15 AM typo
    Friday, February 27, 2015 7:20 PM

All replies

  • Good Ideas !

    Few days ago, I was thinking about the Batttleship with 2 SmallBasic programs. Each player create his version of "robot player". And why not a kind of Championship !

    My idea is to create a small Web Site called by the programs with "Network.GetWebPageContents()" to kown where is the party.

    I think it could be interesting about how create a good battlefield, and how implements a good tactic.

    What do you think about this kind of challenge ? (And why not create after another games in same system)
      

    Regards,


    Yan Grenier

    Merci de bien vouloir "Marquer comme réponse", les réponses qui ont répondues à votre question, et de noter les réponses que vous avez trouvé utiles.

    Friday, February 27, 2015 9:10 PM
    Answerer
  • This would be great - the issue is uploading without credentials or using an extension.

    There are extension methods to do server/client and extended network using credentials (ftp etc) or some using php scripts server side, but we want these challenges to use native SB if possible.

    Any ideas on how this could work?

    Friday, February 27, 2015 9:20 PM
  • Yes. I want just use native SB too.

    I wanted to create a Website (I have some Azure credits that I can used with my companies), with a page that we can call with information in the URL and returns a line with the result oonly with the "Network.GetWebPageContents(). 

    The only "complex" part is to encoding some informations in the url. But we can prepare the code for the user.

    After there is certainly some other problem, but like we say here "Impossible is not french" ;)

    I can look this kind of system for a next month(s) challenge. 

    I asked the question only for known if it's a good idea to spend time for looking at some solutions for this.


    Yan Grenier

    Merci de bien vouloir "Marquer comme réponse", les réponses qui ont répondues à votre question, et de noter les réponses que vous avez trouvé utiles.

    Friday, February 27, 2015 9:32 PM
    Answerer
  • Nice - leave it with you ;)
    Friday, February 27, 2015 9:44 PM
  • OK, I know what I'll do my next weekends :)


    Yan Grenier

    Merci de bien vouloir "Marquer comme réponse", les réponses qui ont répondues à votre question, et de noter les réponses que vous avez trouvé utiles.

    Friday, February 27, 2015 9:47 PM
    Answerer
  • This is my sample for community suggestion by Nonki: PPF232.

    Screen shot of a program Hina Dolls

    March 3 is Doll Festival (Girl's Day) in Japan.


    Nonki Takahashi

    Saturday, February 28, 2015 4:11 AM
  • This is my solution for graphics challenge: PKG503.

    Screen shot of a program Spirograph


    Nonki Takahashi

    Sunday, March 1, 2015 5:24 PM
  • This is a revised version of my graphics challenge: PKG503-0.

    Screen shot of a program Spirograph 0.2


    Nonki Takahashi

    Monday, March 2, 2015 10:41 AM
  • I found a bug of my Spirograph program.  Bug fixed version is PKG503-1.

    • Fixed: expression to calculate wheel angle a2 was wrong.
    • Pause function added.  Hit any key to continue.

    Screen shot of a program Spirograph 0.3


    Nonki Takahashi


    Monday, March 2, 2015 2:48 PM
  • This is my first step for game challenge: GZN668.

    Alpha version - just shows graphics.

    Screen shot of a program Battleship in Small Basic 0.1a


    Nonki Takahashi

    Wednesday, March 4, 2015 11:44 AM
  • Here is a submission for the countdown timer: 

    Import Code: BSV343

    Friday, March 6, 2015 12:20 PM
    Answerer
  • Hello Coding Cat, simple count down!

    Nonki Takahashi

    Monday, March 9, 2015 8:43 AM
  • Good challenges this month!

    What do you think of picking an extension each week and basing a challenge off of it? 

    Just an idea...


    It is written: "'As surely as I live,' says the Lord, 'every knee will bow before me; every tongue will acknowledge God.'" Romans 14:11

    Tuesday, March 10, 2015 9:50 PM
    Answerer
  • Hello Zock77,

    Do you mean picking an extension each week without challenges?  If so, it's better to create a thread about it.  I think that is a worthy topic to discuss.

    Thanks.


    Nonki Takahashi

    Wednesday, March 11, 2015 8:00 AM
  • No, I meant something like this:

    "This week's extension challenge is using the Litdev extension. With the LD physics object, make a simple paddle game"

    I thought it would be cool to go through the list of extensions. Plus, a lot of people would discover the use of some of the more "exotic" extensions. :D


    It is written: "'As surely as I live,' says the Lord, 'every knee will bow before me; every tongue will acknowledge God.'" Romans 14:11

    Friday, March 13, 2015 6:58 PM
    Answerer
  • Good challenges this month!

    What do you think of picking an extension each week and basing a challenge off of it? 

    Just an idea...


    It is written: "'As surely as I live,' says the Lord, 'every knee will bow before me; every tongue will acknowledge God.'" Romans 14:11

    The main monthly challenges are probably best without extensions I think, but it would be nice to build up some examples and challenges using the various extensions and encourage folks to create their own which is great way to start moving on from SB.

    So if you or others including extension developers (me included) want to create monthly extension challenges or how-to guides etc that would be great and could be made sticky for the month and perhaps even over time create a reasonable library of examples of their use.

    To get interactive feedback on the extension challenges I think they should be fairly small challenges, perhaps with a bit of explanation and example provided by the setter.

    Maybe even challenges to create an extension to do something?
    • Edited by litdev Friday, March 13, 2015 10:32 PM
    Friday, March 13, 2015 9:35 PM
  • Here is my entry in to the game based on my challenge, a count down timer.

    I call this one Sudden Death

    Here is the import Code: BSB984

    Enjoy!

     

    Thursday, March 19, 2015 10:45 PM
    Answerer
  • And here is a new Community Challenge for next Month

    Display an Asteroid Field where there are multiple rocks drifting across the screen.

    Thursday, March 19, 2015 10:46 PM
    Answerer
  • Coding Cat,

    Oh, my goodness, that's fun!

    Final score... 978.

    ...1649

    ...2579

    Friday, March 20, 2015 10:13 PM
  • Great wee game!

    Friday, March 20, 2015 10:44 PM
  • Fine praise from such respected sources.  :-)
    Saturday, March 21, 2015 2:30 AM
    Answerer
  • Very funny game :)

    But I'm a bad player :( Best score : 4770


    Yan Grenier

    Merci de bien vouloir "Marquer comme réponse", les réponses qui ont répondues à votre question, et de noter les réponses que vous avez trouvé utiles.

    Saturday, March 21, 2015 4:31 PM
    Answerer
  • Hi all,

    This my solution for the Battleship against the computer :MRV593-2


    Small Basic Battleship Screenshot

    More details in this forum discussion : https://social.msdn.microsoft.com/Forums/en-US/1ab990d7-c6c3-49d6-abba-693571262afa/my-new-game-battleship-la-bataille-navale-frfr?forum=smallbasic

    Have fun ;)

    Yanos


    Yan Grenier

    Merci de bien vouloir "Marquer comme réponse", les réponses qui ont répondues à votre question, et de noter les réponses que vous avez trouvé utiles.

    Saturday, March 21, 2015 6:21 PM
    Answerer
  • Coding Cat, I blogged about your great game:

    http://blogs.msdn.com/b/smallbasic/archive/2015/03/22/featured-small-basic-game-sudden-death.aspx

    Thanks!


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

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

    Monday, March 23, 2015 1:52 AM
  • Thank you kindly sir.  :-)
    Tuesday, March 24, 2015 9:22 PM
    Answerer
  • Hi Coding Cat.  Thank you for creating fun game!

    Screen shot of a program Sudden Death


    Nonki Takahashi

    Wednesday, March 25, 2015 7:41 AM
  • This is my solution for community suggestion (easy) by Coding Cat: DNS916.

    I used Shapes to avoid the counter flickering.


    Nonki Takahashi

    Wednesday, March 25, 2015 8:32 AM
  • This is my second step for game challenge: GZN668-0.

    It's still alpha version.  You can just draw a peg with mouse click.

    Screen shot of a program BATTLESHIP in Small Basic 0.2a


    Nonki Takahashi

    Wednesday, March 25, 2015 3:21 PM
  • Suggestions for a future challenge:

    * Stegano Image:
    Below there a 2 images (a black and a white one, but could be any monochrome picture) that look rather boring. But both of them contain a very, very, .. OK & very important and secret message.

    Simply write a SB program to reveal and view the hidden contents.
    Hint: The red component in some parts of the image(s) is NOT as it should be on a pure black (or white/monochrome) image! Maybe even try to show the solution(s) in colors (eg. red, green; blue, yellow like on a MS flag)
    PS: To impede cheating there's also included a simple 'flood protection'.
    To create a similar image yourself, you would need LitDev Ext and ~ 10-20 lines of code.

    * NoSleep:
    Imagine you are running a huge download or another unattended process and you want to avoid, that your computer gets to sleep or hibernation, while you're away. Write a simple SB program, that keeps your system awake in the meantime.

    Friday, March 27, 2015 7:57 PM
    Answerer
  • Nonki and Yan, I featured your Battleship games here: http://blogs.msdn.com/b/smallbasic/archive/2015/03/28/battleship-games-small-basic-featured-programs.aspx

     

    Thanks!


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

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

    Saturday, March 28, 2015 10:52 PM
  • Hi Coding Cat.  Thank you for creating fun game!

    Screen shot of a program Sudden Death


    Nonki Takahashi

    Nonki, I'm adding your top score to the blog post: http://blogs.msdn.com/b/smallbasic/archive/2015/03/22/featured-small-basic-game-sudden-death.aspx

    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!

    Saturday, March 28, 2015 10:58 PM
  • This is a hint for the second text challenge:
    • Write a program the center some text in the GraphicsWindow or in the TextWindow.

    Small Basic: Centering Text in Graphics Window (TechNet Wiki Article)


    Nonki Takahashi

    Monday, March 30, 2015 4:20 AM
  • This is my idea for a future challenge:

    • Write a simple Logo interpreter which has following 6 commands:
      FORWARD n (to move the turtle n pixels)
      RIGHT n (to rotate the turtle right n degrees)
      LEFT n (to rotate the turtle left n degrees)
      PENUP (to lift the pen up)
      PENDOWN (to set the pen down)
      REPEAT n [commands] (to repeat commands n times)

    Nonki Takahashi


    • Edited by Nonki Takahashi Monday, March 30, 2015 4:55 AM case changed from LOGO
    Monday, March 30, 2015 4:52 AM
  • This is my third step for game challenge: GZN668-1.

    Still alpha version.  Added opening.


    Nonki Takahashi

    Tuesday, March 31, 2015 12:51 PM