Vai al contenuto

Challenge 2015-02

2015-02-02Small Challenges

  1. Write a program to read several pieces of input from the user and decide if each input is a number or not.
  2. Write a program to calculate the first 20 triangular numbers.
  3. Write a program to draw a windmill with moving sails.
  4. 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 (16×16) editor.
    PPM is a text format which can save RGB color bitmap.
    Following code is a sample PPM.
P3
16 16
255
255 255 255  255 255 255  255 255 255  255 255 255  255 255 255  227 233 224   48  72  36    5  12   1    5  12   1   48  72  36  227 233 224  255 255 255  255 255 255  255 255 255  255 255 255  255 255 255
255 255 255  255 255 255  255 255 255  255 255 255  255 255 255   26  46  16   13  40   0   38 113   0   35 106   0   10  31   0   25  45  16  255 255 255  255 255 255  255 255 255  255 255 255  255 255 255
255 255 255  255 255 255  255 255 255  255 255 255  255 255 255    0   0   0   41 124   0   51 153   0   51 153   0   41 124   0    0   1   0  255 255 255  255 255 255  255 255 255  255 255 255  255 255 255
255 255 255  255 255 255  255 255 255  255 255 255  255 255 255   26  46  169  28   0   3    9 118   0   36 109   0   10  30   0   26  46  16  255 255 255  255 255 255  255 255 255  255 255 255  255 255 255
255 255 255  192 192 168  173 173 144  255 255 255  255 255 255  102 128  89   10  28   1   13  14  13   14  14  13   10  28   1  102 128  89  255 255 255  255 255 255  173 173 144  192 192 168  255 255 255
 72  72  36    2   2   0   11  11   1   18  24   7   15  31   6    9  28   0   33 100   0   50  74  37   49  75  36   29  88   0    9  26   0   21  34  13   19  25   8   16  16   0    7   7   0   74  74  37
  1   1   0  137 137   0  136 136   6   43  46  41   33  50  24   51  93  30   51 129  12   51  61  46   51  78  37   51 113  20   50  85  33   43  50  39   45  48  44  147 147   3  124 124   0    3   3   0
 11  11   1   77  77   0   72  96   0   34  40  31   48 104  21  166 219   5   51  69  42   51  58  47   51  66  44   51  73  40  166 221   4   48  94  25   31  38  28   69  93   0   64  64   0   11  11   1
193 193 170   12  12   1    8  25   0   38  83  15   51  83  35   51 100  26   51  76  39   51 134  10   51 139   7   51  71  41   51 112  20   51  87  33   31  76   9    9  25   0   12  12   1  193 193 170
255 255 255  255 255 255   13  13  13   50  74  38   51  58  47   51 101  26   51 143   5  175 236   0  175 236   0   51 138   8   51  76  39   51  56  48   50  74  37   13  14  13  255 255 255  255 255 255
255 255 255  255 255 255   13  13  13   50  79  35   51  56  49   51  73  40   51 137   8  175 236   0  175 236   0   51 139   7   51  83  35   51  64  44   49  78  35   13  14  13  255 255 255  255 255 255
192 192 168   12  12   1    9  26   0   35  84  10   51  80  37   51 116  19   51  79  37   51 129  12   51 128  12   51  75  39   51 102  26   51  78  38   31  83   5    9  25   0   12  12   1  192 192 168
 11  11   1   84  84   0   73  97   0   34  41  30   50 104  23  166 219   5   51  66  44   51  65  44   51  59  47   51  77  38  166 220   5   49  90  28   27  31  25   69  93   0   73  73   0   12  12   1
  0   0   0  126 126   0  144 144   0   28  37  22   31  49  22   49  88  29   51 121  16   51  79  37   51  71  41   51 123  15   49  86  31   44  49  42   24  35  18  153 153   0  120 120   0    4   4   0
 72  72  36    1   1   0    6   6   0   14  19   1   16  32   6    8  23   0   29  86   0   49  75  37   49  78  35   29  86   0    4  12   0   19  33  11   15  20   2   11  11   0    5   5   0   74  74  37
255 255 255  193 193 170  173 173 145  255 255 255  255 255 255  113 137 101   18  34   9   13  14  13   13  14  13   18  34   9  112 136 100  255 255 255  255 255 255  173 173 145  193 193 170  255 255 255

2015-02-01by Jibba Jabba

  • Write a Hangman game

by Pappa Laupub

  1. 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…
  2. 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

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.