Freigeben über


Small Basic Challenges of the Month - January 2017 (featuring Johannes Kepler, Isaac Newton, and golf putting)

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

Post your solutions here:

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.

Keyboard Challenges

Suggested last month by mussamaina, some challenges using keyboard keys:

  • Write a program to move a sprite on the GraphicsWindow using arrow keys.  Try to make it as smooth and responsive as possible.
  • Extend the program to make the sprite jump when the space key is pressed.
  • Extend the program to drag and drop the sprite using the mouse when left mouse button is down.
  • Write a program to make the GraphicsWindow behave like the TextWindow so you can emulate as  many of the TextWindow commands as possible, like WriteLine, Read etc.
  • Write a program to work like a simple musical instrument using keyboard keys to play notes

Small Challenges

  • Write a Turtle program to draw a triangle, square, pentagon and circle.
  • Write a program to count down from 100 in 1 second intervals.
  • Write a program to add 10 numbers entered by a user.
  • Write a program to draw a hand.
  • Write a program to randomly position, color, size and rotate 100 squares in the GraphicsWindow.

Physics Challenge

  • Write a program to display the planets moving round the sun - try to get the orbit times roughly correct.
  • Add the moon orbiting the earth.
  • Add some comets with elliptical orbits around the sun - they move faster when near the sun.

Elliptical orbits were first described by Johannes Kepler and later explained by Isaac Newton.

TextWindow Game Challenge

  • Write a TextWindow based adventure game.  The important part will be to plan out the game first, like what the player needs to find along the way to progress.

GraphicsWindow Game Challenge

Community Suggestions

  • Meteor shower Quadrantids (by YLed) LINK

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

 

Big thanks go out to LitDev for hosting these challenges, and to all those who participate!

Please go check out the programs people are building for this challenge!

 

Small and Basically tired,

  • Ninja Ed

Comments

  • Anonymous
    February 14, 2017
    We extended the January challenges into February as well!