# Small Basic Monthly Challenges (February 2015) – File Listing, Gravity Missiles, 2048, Icon Editor, MP3 Size Calculator, and Hangman!!!

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 here on the kind of challenges that you want to see more of in the future.

Small Challenges

• Write a program to read several pieces of input from the user and decide if each input is a number or not.
• Write a program to calculate the first 20 triangular numbers.
• Write a program to draw a windmill with moving sails.
• Write a program to list all of your Small Basic files.

Physics Challenge

• Write a program to fire a missile at a target taking into account gravity.  The user sets the trajectory angle before firing the missile.  Perhaps the target will be moving.

Game Challenge

• Write a clone of the game 2048.

Commulty Suggestion (by Nonki)

• Write a PPM (portable pixmap format) bitmap icon (16x16) editor.  PPM is a text format which can save RGB color bitmap.  The following code is a sample PPM:
`P3 161625525525525525525525525525525525525525525525525522723322448723651215121487236227233224255255255255255255255255255255255255255255255255255255255255255255255255255255255255255255264616134003811303510601031025451625525525525525525525525525525525525525525525525525525525525525525525525525525525525525525500041124051153051153041124001025525525525525525525525525525525525525525525525525525525525525525525525525525525525525525526461692803911803610901030026461625525525525525525525525525525525525525525525525525525519219216817317314425525525525525525510212889102811314131414131028110212889255255255255255255173173144192192168255255255727236220111111824715316928033100050743749753629880926021341319258161607707474371101371370136136643464133502451933051129125161465178375111320508533435039454844147147312412403301111177770729603440314810421166219551694251584751664451734016622144894253138286993064640111111931931701212182503883155183355110026517639511341051139751714151112205187333176992501212119319317025525525525525525513131350743851584751101265114351752360175236051138851763951564850743713141325525525525525525525525525525525525513131350793551564951734051137817523601752360511397518335516444497835131413255255255255255255192192168121219260358410518037511161951793751129125112812517539511022651783831835925012121192192168111118484073970344130501042316621955166445165445159475177381662205499028273125699307373012121000126126014414402837223149224988295112116517937517141511231549863144494224351815315301201200440727236110660141911632682302986049753749783529860412019331115202111105507474372552552551931931701731731452552552552552552551131371011834913141313141318349112136100255255255255255255173173145193193170255255255`

Commulty Suggestion (by Jibba Jabba)

• Write a Hangman game

Commulty Suggestion (by Pappa Laupub)

• Write an Mp3 size calculator to calculate one of the values of filesize, playing duration and bitrate from the other both. Eg. enter playing time [sec] or [min] and bitrate to determine an approximate filesize in eg. bytes, kB, MB as result. etc...
• Write a simple program to view the contents of your 'hosts' file and add at least one function you might find useful. eg. look up if a certain address is listed, add a server address to be blocked, etc.

PS: Better don't write to your original hosts file directly, but use eg. hosts_YYMMDD.txt or similar instead and replace it manually later (always backup the original before changes). Furher reading: eg. Hosts

Do you have an idea for a future challenge? Please post it in this forum thread

Small and Basically Yours,

litdev & Ninja Ed