Small Basic – November Code Challenges!!!

This post has been republished via RSS; it originally appeared at: Small Basic Blog articles.

First published on MSDN on Nov 05, 2018

Authored by Ed Price


Special thanks to litdev for hosting these challenges!

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!

Head to this thread to get started:

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.

Graphics Challeges

  • Draw a train

  • Draw a wizard

  • Draw a dragon


Animated Graphics Challenges

  • Flash a message at random intervals in the GraphicsWindow, say randomly between 5 and 20 second intervals.

  • Draw an animated (moving) 'nodding donkey' well.  There are plenty of YouTube videos of them working.





File Challenge

  • Write a program to log all key presses to a file, recording the time when they were pressed


Maths Challenges

  1. What is the smallest number which when divided by 28 leaves 8 as remainder and when divided by 32 leaves 12 as the remainder?

  2. What is the smallest four digit number which when divided by 16 and 18 leaves remainder 8 in each case?

  3. What is the smallest number which when divided by 12 and 18 leaves a remainder of 9?

  4. What is the smallest number that leaves 3 as remainder when divided by 18 and 24?

  5. What is the smallest number which when divided by 14 and 21 leaves no remainder?

  6. What is the smallest number which leaves 3 as a remainder when divided by 9, 12, 18, and 30?


Turtle Challenge

  • Load the image of a maze below into the GraphicsWindow, then get the turtle to navigate the maze.





maze = "https://social.msdn.microsoft.com/Forums/getfile/1354354"
GraphicsWindow.DrawResizedImage(maze,0,0,GraphicsWindow.Width,GraphicsWindow.Height)

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



LitDev & Ninja Ed

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.