none
Challenge of the Month - December 2016 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.

    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!

    Wednesday, November 30, 2016 7:37 PM
    Moderator

All replies

  • great December challenges !

    and I especially like the challenge of tennis table and karaoke song.

    I'll try some things for these 2 challenges.

    The sundial clock challenge, amazing !,  a  big month on the computer is coming  :)

     
    Wednesday, November 30, 2016 10:33 PM
    Answerer
  • This is my solution for the music challenge: QRX067.

    Screen shot of a program Let It Be


    Nonki Takahashi

    Saturday, December 3, 2016 2:01 PM
    Moderator
  • Nonki,

    Super  sound !!

    Saturday, December 3, 2016 3:51 PM
    Answerer
  • Nonki, Fantastic.
    Saturday, December 3, 2016 7:26 PM
    Moderator
  • nice work nonky,as always.

    a bit updated ur beatles playing: qrx067-0

    • smoother anim
    • added pic from flickr
    • changed some colors 

    • Edited by Tryhest Sunday, December 4, 2016 8:44 AM
    Sunday, December 4, 2016 8:42 AM
  • @litdev

    Hi !

    Can i make a song, but without lyrics as your challenge specify ?

    I want to do '' Kanon '' from J.Palchelbel

    Sunday, December 4, 2016 3:36 PM
    Answerer
  • @litdev

    Hi !

    Can i make a song, but without lyrics as your challenge specify ?

    I want to do '' Kanon '' from J.Palchelbel

    of course - challenges are just ideas
    Sunday, December 4, 2016 5:04 PM
    Moderator
  • There is my ping pong game :D

    HGS134

    Monday, December 5, 2016 11:36 AM
  • Music December challenge

    author: Johann Sebastian Bach ( 1685-1750)

    title: Jesu,Joy of Man's Desiring

    Version no 2: FQS551

    version no 3: MFK444 

    version no 4: JNG981

    final version: LDJ923

    For a better high quality audio experience , I suggest you to listen on a high-fidelity sound  system through your Bluetooth utility if your audio receiver has this function. Indeed, when I listen to it at home in this way,
    you will especially discover the richness of the sounds in the bass range, and enjoyed the richness of the piano sound provided by Microsoft Small Basic .








    • Edited by YLedEditor Sunday, December 18, 2016 1:49 PM final song and new image
    Monday, December 5, 2016 4:36 PM
    Answerer
  • for Nonki blog:

    https://blogs.msdn.microsoft.com/smallbasic/2016/12/05/small-basic-think-about-textbox-ux/

    Tuesday, December 6, 2016 6:50 PM
    Answerer
  • @professionalofsmallbasic

    Great program !

    I have an idea, it work !

    to begin with a slower level,

    I tried to add this small code just after the shape, line 137, this little program.delay of 10 milliseconds command would give a level 1, and then you may reduce this time to do faster levels, an idea like that.

     line 136 :   Shapes.Move(ball,ball_x,ball_y)
     line 137 :   Program.Delay(10)


    • Edited by YLedEditor Wednesday, December 7, 2016 3:17 PM
    Wednesday, December 7, 2016 3:16 PM
    Answerer
  • Thanks YLed for your support and great idea!

    I added speed and It raises by goal count:

    HGS134-1


    Thursday, December 8, 2016 2:30 PM
  • Hi Pro SB ! what about this :)

    I think i found the re-initialize problem, when the game is over, it goes to: sub gameover

    I add line no 224   : the statement: GraphicsWindow.showmessage ("Do you want to play again?(Y/N)","replay")

    I add line no 165: then the program return to line 165: resetgame()

    here is a full version: CFD511

    Friday, December 9, 2016 5:03 PM
    Answerer
  • Thank you YLed but there is a problem with showing a message!

    When you click "OK" or close the window, it automatically starts over.

    We don't want that. We want player to chose "to replay or not to replay" :D

    The new version of game: CFD511-1 (Made some visual fixes and turned back to drawing replay question)


    Saturday, December 10, 2016 5:51 PM
  • Community Suggestions

       Falling snow (byYLed)    CSS325-1     Ducks Sounds  from YLed ,Thanks.

      
    Sunday, December 11, 2016 2:47 AM
    Answerer
  • chiaroscuro effects: BVN526

    • used source images from below
    • prior to use install latest ld xtension .13
    • move red dot to regulate x-y lighting offset
    • use upper slider to adjust embossing
    • use down slider to adjust z light level
    • result:


    • Edited by Tryhest Sunday, December 11, 2016 4:41 AM
    Sunday, December 11, 2016 4:38 AM
  • well done nao))

    updated a bit ur work: css325-2

    • removed sound
    • lake and green gets white while snows down

    Sunday, December 11, 2016 5:10 AM
  • Cycle ID NZT858 Posted by mahreen miangul with love from mussa- maina
    Sunday, December 11, 2016 11:29 AM
  • here is my solution for the sundial challenge .!

    program : VDQ130


    • Edited by YLedEditor Sunday, December 11, 2016 5:35 PM with minutes
    Sunday, December 11, 2016 5:30 PM
    Answerer
  • Falling Snow mahreen miangul ID XFJ262
    Tuesday, December 20, 2016 11:20 AM
  • Panda mahreen miangul ID MJX535
    Wednesday, December 21, 2016 12:53 PM
  • Panda mahreen miangul ID MJX535
    Nice one. Cute panda! Building off the old panda art from Nonki. Looks good!

    Ed Price, Azure Development Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

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


    Wednesday, December 21, 2016 3:06 PM
    Owner
  • Falling Snow mahreen miangul ID XFJ262

    Ha! I love this one. This is a fun scene. Love the falling snow!

    http://www.smallbasic.com/smallbasic.com/program/?XFJ262

    Do you get much snow? I got a little here in Washington state, USA. Thankfully it didn't stick too much, so we could still drive okay.


    Ed Price, Azure Development Customer Program Manager (Blog, Small Basic, Wiki Ninjas, Wiki)

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

    Wednesday, December 21, 2016 3:09 PM
    Owner
  • Guru Ed Price thanks for comenting on ID XFJ262 we dont get snow in mussa-maina but it is chilling cold how ever we get snow 50 km away from us in Swat with thanks again

                                mahreen miangulmussa-maina

    Thursday, December 22, 2016 4:26 AM
  • hello and marry christmas, january2017 challenge should be about KeyBoard,s Keys mahreen miangul
    Saturday, December 24, 2016 2:23 PM
  • Lion mahreen miangul ID WHX921
    Sunday, December 25, 2016 12:12 PM