none
Challenge of the Month - March 2018 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.

    Game Challenge

    Write a simple stone paper scissors game to play against the computer.

    TextWindow Challenge

    Write programs to:

    1. Count the number of vowels and consonants in a sentense.
    2. Capitalise the first letter of each word in a sentence.
    3. Scroll a sentence in the TextWindow.


    Turtle Interface Challenge

    Write an interface GUI (Graphical User Interface) program to input commands for the turtle to move.  Perhaps turn, forwards, pen-up/down etc.

    Graphics Challenges

    Draw a dart board.

    Write a GraphicsWindow program to draw an ailien.  It can be any kind of alien, as fantastical as you like.


    Maths Challenge

    Extended from last month's challenge calculating dice probabilities.  Some a bit harder this time, perhaps using random number tests to approximate solutions.

    Calculate the probablitiy of:

    1. Getting a combined score greater than 14 (15 or more) when rolling 4 dice.
    2. Rolling at least one pair with the same value when rolling 3 dice.
    3. Getting 4 consecutive numbers when rolling 4 dice.
    4. Gettng 3 of a kind, 2 of a kind and one other value when rolling 5 dice.
    5. Getting a combined score less than or equal to 20 using 10 dice.
    6. Rolling a score of 7 with 2 dice, 6 times in a row.
    7. Rolling a score of 7 with 2 dice at least 3 times out of 6 rolls.


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


    Wednesday, February 28, 2018 5:35 PM
    Moderator

All replies

  • TextWindow Challenge

    2. Capitalise the first letter of each word in a sentence. ID: VQL120

    Friday, March 2, 2018 9:10 PM
    Answerer
  • This is my solution for the graphics challenge: XFF651.

    Screen shot of a program Dart Board 0.1


    Nonki Takahashi

    Sunday, March 11, 2018 3:19 PM
    Moderator
  • Hi litdev, I think 4th one in the maths challenge will be:

    4. Getting 3 of a kind, 2 of a kind and one other value when rolling 6 dice.

    or 

    4. Getting 3 of a kind and 2 of a kind when rolling 5 dice.


    Nonki Takahashi

    Wednesday, March 14, 2018 1:59 PM
    Moderator
  • This is my first step for the maths challenge: LVP196.

    Screen shot of a program Dice Probability 0.1a

    It took 2 hours and 8 minutes to get score graph with 10 dice...


    Nonki Takahashi

    Wednesday, March 14, 2018 3:52 PM
    Moderator
  • Hi litdev, I think 4th one in the maths challenge will be:

    4. Getting 3 of a kind, 2 of a kind and one other value when rolling 6 dice.

    or 

    4. Getting 3 of a kind and 2 of a kind when rolling 5 dice.


    Nonki Takahashi


    Possibly badly worded, but there is a subtle difference in that the last (6th) dice cannot be the same as the 3 of a kind or the pair.
    Wednesday, March 14, 2018 11:13 PM
    Moderator
  • This is my second step for the maths challenge: LVP196-0.

    Screen shot of a program Dice Probability 0.2a

    This program can calculate following two.

    1. 44.3%
    5. 0.2%


    Nonki Takahashi


    Thursday, March 15, 2018 2:28 PM
    Moderator
  •  

    Write a GraphicsWindow program to draw an ailien. VWN806

    (Sorry this uses LDextension // LDshapes.addpolygn)

    *Now I'm making a shapes editor. It uses LDshapesAddpolygon (Rectangle,Ellipse,triangle,line are made by using LDshapes.addpolygon) 

     This is made by using the Editor.

     
    Thursday, March 22, 2018 4:43 AM
    Answerer