none
Challenge of the Month - November 2017 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.

    Graphics Challenges

    • Create drawings of different kind of tree leaves
    • Draw an isometric projection drawing of a house


    Animation Challenge

    • Create a moving animation of a person or other animal (spider, snake etc) with animated limbs or other body parts


    Maths Challenge

    Small Basic import IDs are 3 upper case letters followed by 3 numbers

    • How many possible combinations are there
    • Write a program to generate 1000 distinct (all different) random IDs
    • Can you speed the program up - HINT the IDs only need to 'appear' random

    TextWindow Game Challenge

    • Create a TextWindow base hangman game

    Physics Challenge

    • Create a realistic simulation of a swinging pendulum

    File:Pendulum 2 (PSF).png - The Work of God's Children

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


    Wednesday, November 1, 2017 8:09 PM
    Moderator

All replies

  • houses of lights: KKW984

    Thursday, November 2, 2017 6:50 AM
  • House mahreen miangul ID HGK302

    GraphicsWindow.Left = 0.1 * (Desktop.Width - GraphicsWindow.Width)
    GraphicsWindow.Top = 0 * (Desktop.Height - GraphicsWindow.Height)
    GraphicsWindow.Title = "mahreen miangul"
    GraphicsWindow.BackgroundColor="darkcyan"
    GraphicsWindow.Width = "1111"
    GraphicsWindow.Height = "666"

    'Makesprite()
    SPRITE_init()          '  <---------   all shape data is input here!!
    add_shapes()           '  <---------   all shapes are added  here!!

    ' Add Sprites
    Sub add_shapes
      For M=1 to Array.GetItemCount(s)      '   6 types shapes // BlueCar, Trees  , House ,  Apple , Aircraft , Ladder3D/
        For N=1 to Array.GetItemCount(s[M]) '  repeat number  //BlueCar=1 , Trees =14 ,  House=1 ,  Apple=18 , Aircraft=1 , Ladder3D=1//
          ss=s[M][N]      '  scale
          _shx=shx[M][N]  '  base point _X
          _shY=shY[M][N]  '  base point _Y
          _shape=shape[M] '  temporary shape data  
          NMB=M+":"+N     '  shape index
          for i=1 To Array.GetItemCount(_shape)
            GraphicsWindow.PenWidth = _shape[i]["pw"]
            GraphicsWindow.BrushColor = _shape[i]["bc"]  
            GraphicsWindow.penColor = _shape[i]["pc"]
            If _shape[i]["func"]="ell" Then
              shp[NMB][i] = Shapes.AddEllipse(_shape[i]["width"]*ss, _shape[i]["height"]*ss)
            ElseIf _shape[i]["func"]="rect" Then
              shp[NMB][i] = Shapes.AddRectangle(_shape[i]["width"]*ss, _shape[i]["height"]*ss)
            ElseIf _shape[i]["func"]="tri" Then
              shp[NMB][i] = Shapes.Addtriangle(_shape[i]["x1"]*ss, _shape[i]["y1"]*ss,_shape[i]["x2"]*ss, _shape[i]["y2"]*ss, _shape[i]["x3"]*ss, _shape[i]["y3"]*ss)
            ElseIf _shape[i]["func"]="line" Then
              shp[NMB][i] = Shapes.Addline(_shape[i]["x1"]*ss, _shape[i]["y1"]*ss,_shape[i]["x2"]*ss, _shape[i]["y2"]*ss)
            EndIf
            Shapes.Animate(shp[NMB][i], _shape[i]["x"]*ss+_shX, _shape[i]["y"]*ss+_shY, 500)
            Shapes.Rotate(shp[NMB][i], _Shape[i]["angle"])    
          EndFor
        endfor
      endfor
    EndSub

    Sub SPRITE_init
      ' House
      s[1] ="1=0.4"  
      shX[1] ="1=420"
      shY[1] ="1=420"
      shape[1][1] = "func=rect;x=-420;y=-420;width=100;height=40;bc=PowderBlue;pw=0;"'1
      shape[1][2] = "func=rect;x=-310;y=-420;width=100;height=40;bc=PowderBlue;pw=0;"'1
      shape[1][3] = "func=rect;x=-200;y=-420;width=100;height=40;bc=SkyBlue;pw=0;"'1
      shape[1][4] = "func=rect;x=-90;y=-420;width=100;height=40;bc=SkyBlue;pw=0;" '1
      shape[1][5] = "func=rect;x=20;y=-420;width=100;height=40;bc=orange;pw=0;" '1
      shape[1][6] = "func=rect;x=130;y=-420;width=100;height=40;bc=orange;pw=0;"'1
      shape[1][7] = "func=rect;x=240;y=-420;width=100;height=40;bc=orange;pw=0;"'1
      shape[1][8] = "func=rect;x=350;y=-420;width=100;height=40;bc=orange;pw=0;" '1
      shape[1][9] = "func=rect;x=460;y=-420;width=100;height=40;bc=orange;pw=0;"'1
      shape[1][10] = "func=rect;x=570;y=-420;width=100;height=40;bc=orange;pw=0;"'1
      shape[1][11] = "func=rect;x=-430;y=-375;width=50;height=40;bc=orange;pw=0;"'2
      shape[1][12] = "func=rect;x=-370;y=-375;width=100;height=40;bc=orange;pw=0;"'2
      shape[1][13] = "func=rect;x=-260;y=-375;width=100;height=40;bc=orange;pw=0;"'2
      shape[1][14] = "func=rect;x=-150;y=-375;width=100;height=40;bc=orange;pw=0;"'2
      shape[1][15] = "func=rect;x=-40;y=-375;width=100;height=40;bc=orange;pw=0;"'2
      shape[1][16] = "func=rect;x=70;y=-375;width=100;height=40;bc=orange;pw=0;"'2
      shape[1][17] = "func=rect;x=180;y=-375;width=100;height=40;bc=orange;pw=0;"'2
      shape[1][18] = "func=rect;x=290;y=-375;width=100;height=40;bc=orange;pw=0;"'2
      shape[1][19] = "func=rect;x=400;y=-375;width=100;height=40;bc=orange;pw=0;"'2
      shape[1][20] = "func=rect;x=510;y=-375;width=100;height=40;bc=orange;pw=0;"'2
      shape[1][21] = "func=rect;x=620;y=-375;width=100;height=40;bc=orange;pw=0;"'2
      shape[1][22] = "func=rect;x=-420;y=-330;width=100;height=40;bc=orange;pw=0;"'3
      shape[1][23] = "func=rect;x=-310;y=-330;width=100;height=40;bc=orange;pw=0;"'3
      shape[1][24] = "func=rect;x=-200;y=-330;width=100;height=40;bc=orange;pw=0;"'3
      shape[1][25] = "func=rect;x=-90;y=-330;width=100;height=40;bc=orange;pw=0;" '3
      shape[1][26] = "func=rect;x=20;y=-330;width=100;height=40;bc=orange;pw=0;" '3
      shape[1][27] = "func=rect;x=130;y=-330;width=100;height=40;bc=orange;pw=0;"'3
      shape[1][28] = "func=rect;x=240;y=-330;width=100;height=40;bc=orange;pw=0;"'3
      shape[1][29] = "func=rect;x=350;y=-330;width=100;height=40;bc=orange;pw=0;" '3
      shape[1][30] = "func=rect;x=460;y=-330;width=100;height=40;bc=orange;pw=0;"'3
      shape[1][31] = "func=rect;x=570;y=-330;width=100;height=40;bc=orange;pw=0;"'3
      shape[1][32] = "func=rect;x=-430;y=-285;width=50;height=40;bc=orange;pw=0;"'4
      shape[1][33] = "func=rect;x=-370;y=-285;width=100;height=40;bc=orange;pw=0;"'4
      shape[1][34] = "func=rect;x=-260;y=-285;width=100;height=40;bc=orange;pw=0;"'4
      shape[1][35] = "func=rect;x=-150;y=-285;width=100;height=40;bc=orange;pw=0;"'4
      shape[1][36] = "func=rect;x=-40;y=-285;width=100;height=40;bc=orange;pw=0;"'4
      shape[1][37] = "func=rect;x=70;y=-285;width=100;height=40;bc=orange;pw=0;"'4
      shape[1][38] = "func=rect;x=180;y=-285;width=100;height=40;bc=orange;pw=0;"'4
      shape[1][39] = "func=rect;x=290;y=-285;width=100;height=40;bc=orange;pw=0;"'4
      shape[1][40] = "func=rect;x=400;y=-285;width=100;height=40;bc=orange;pw=0;"'4
      shape[1][41] = "func=rect;x=510;y=-285;width=100;height=40;bc=orange;pw=0;"'4
      shape[1][42] = "func=rect;x=620;y=-285;width=100;height=40;bc=orange;pw=0;"'4
      shape[1][43] = "func=rect;x=-420;y=-240;width=100;height=40;bc=orange;pw=0;"'5
      shape[1][44] = "func=rect;x=-310;y=-240;width=100;height=40;bc=orange;pw=0;"'5
      shape[1][45] = "func=rect;x=-200;y=-240;width=100;height=40;bc=orange;pw=0;"'5
      shape[1][46] = "func=rect;x=-90;y=-240;width=100;height=40;bc=orange;pw=0;" '5
      shape[1][47] = "func=rect;x=20;y=-240;width=100;height=40;bc=orange;pw=0;" '5
      shape[1][48] = "func=rect;x=130;y=-240;width=100;height=40;bc=orange;pw=0;"'5
      shape[1][49] = "func=rect;x=240;y=-240;width=100;height=40;bc=orange;pw=0;"'5
      shape[1][50] = "func=rect;x=350;y=-240;width=100;height=40;bc=orange;pw=0;" '5
      shape[1][51] = "func=rect;x=460;y=-240;width=100;height=40;bc=orange;pw=0;"'5
      shape[1][52] = "func=rect;x=570;y=-240;width=100;height=40;bc=orange;pw=0;"'5
      shape[1][53] = "func=rect;x=-430;y=-195;width=50;height=40;bc=orange;pw=0;"'6
      shape[1][54] = "func=rect;x=-370;y=-195;width=100;height=40;bc=orange;pw=0;"'6
      shape[1][55] = "func=rect;x=-260;y=-195;width=100;height=40;bc=orange;pw=0;"'6
      shape[1][56] = "func=rect;x=-150;y=-195;width=100;height=40;bc=orange;pw=0;"'6
      shape[1][57] = "func=rect;x=-40;y=-195;width=100;height=40;bc=orange;pw=0;"'6
      shape[1][58] = "func=rect;x=70;y=-195;width=100;height=40;bc=orange;pw=0;"'6
      shape[1][59] = "func=rect;x=180;y=-195;width=100;height=40;bc=orange;pw=0;"'6
      shape[1][60] = "func=rect;x=290;y=-195;width=100;height=40;bc=orange;pw=0;"'6
      shape[1][61] = "func=rect;x=400;y=-195;width=100;height=40;bc=orange;pw=0;"'6
      shape[1][62] = "func=rect;x=510;y=-195;width=100;height=40;bc=orange;pw=0;"'6
      shape[1][63] = "func=rect;x=620;y=-195;width=100;height=40;bc=orange;pw=0;"'6
      shape[1][64] = "func=rect;x=-420;y=-150;width=100;height=40;bc=orange;pw=0;"'7
      shape[1][65] = "func=rect;x=-310;y=-150;width=100;height=40;bc=orange;pw=0;"'7
      shape[1][66] = "func=rect;x=-200;y=-150;width=100;height=40;bc=orange;pw=0;"'7
      shape[1][67] = "func=rect;x=-90;y=-150;width=100;height=40;bc=orange;pw=0;" '7
      shape[1][68] = "func=rect;x=20;y=-150;width=100;height=40;bc=orange;pw=0;" '7
      shape[1][69] = "func=rect;x=130;y=-150;width=100;height=40;bc=orange;pw=0;"'7
      shape[1][70] = "func=rect;x=240;y=-150;width=100;height=40;bc=orange;pw=0;"'7
      shape[1][71] = "func=rect;x=350;y=-150;width=100;height=40;bc=orange;pw=0;" '7
      shape[1][72] = "func=rect;x=460;y=-150;width=100;height=40;bc=orange;pw=0;"'7
      shape[1][73] = "func=rect;x=570;y=-150;width=100;height=40;bc=orange;pw=0;"'7
      shape[1][74] = "func=rect;x=-430;y=-105;width=50;height=40;bc=orange;pw=0;"'8
      shape[1][75] = "func=rect;x=-370;y=-105;width=100;height=40;bc=orange;pw=0;"'8
      shape[1][76] = "func=rect;x=-260;y=-105;width=100;height=40;bc=orange;pw=0;"'8
      shape[1][77] = "func=rect;x=-150;y=-105;width=100;height=40;bc=orange;pw=0;"'8
      shape[1][78] = "func=rect;x=-40;y=-105;width=100;height=40;bc=orange;pw=0;"'8
      shape[1][79] = "func=rect;x=70;y=-105;width=100;height=40;bc=orange;pw=0;"'8
      shape[1][80] = "func=rect;x=180;y=-105;width=100;height=40;bc=orange;pw=0;"'8
      shape[1][81] = "func=rect;x=290;y=-105;width=100;height=40;bc=orange;pw=0;"'8
      shape[1][82] = "func=rect;x=400;y=-105;width=100;height=40;bc=orange;pw=0;"'8
      shape[1][83] = "func=rect;x=510;y=-105;width=100;height=40;bc=orange;pw=0;"'8
      shape[1][84] = "func=rect;x=620;y=-105;width=100;height=40;bc=orange;pw=0;"'8'
      shape[1][85] = "func=rect;x=-155;y=-335;width=200;height=300;bc=firebrick;pc=black;pw=2;"'D
      shape[1][86] = "func=rect;x=255;y=-335;width=250;height=180;bc=SeaGreen;pw=2;"'W
      shape[1][87] = "func=rect;x=680;y=-420;width=50;height=40;bc=orange;pw=0;"'LU1
      shape[1][88] = "func=rect;x=730;y=-470;width=50;height=40;bc=orange;pw=0;"'LU1
      shape[1][89] = "func=rect;x=780;y=-520;width=50;height=40;bc=orange;pw=0;"'LU1
      'shape[1][90] = "func=rect;x=830;y=-570;width=50;height=40;bc=orange;pw=0;"'LU1
      'shape[1][91] = "func=rect;x=880;y=-620;width=50;height=40;bc=orange;pw=0;"'L1
      shape[1][90] = "func=rect;x=720;y=-400;width=50;height=40;bc=orange;pw=0;"'L1
      shape[1][91] = "func=rect;x=760;y=-370;width=50;height=40;bc=orange;pw=0;"'L1
      shape[1][92] = "func=rect;x=800;y=-340;width=50;height=40;bc=orange;pw=0;"'L1
      shape[1][93] = "func=rect;x=840;y=-310;width=50;height=40;bc=orange;pw=0;"'L1
      shape[1][94] = "func=rect;x=880;y=-280;width=50;height=40;bc=orange;pw=0;"'L1
      shape[1][95] = "func=rect;x=700;y=-330;width=50;height=40;bc=orange;pw=0;"'L2
      shape[1][96] = "func=rect;x=740;y=-300;width=50;height=40;bc=orange;pw=0;"'L2
      shape[1][97] = "func=rect;x=780;y=-270;width=50;height=40;bc=orange;pw=0;"'L2
      shape[1][98] = "func=rect;x=820;y=-240;width=50;height=40;bc=orange;pw=0;"'L2
      shape[1][99] = "func=rect;x=860;y=-210;width=50;height=40;bc=orange;pw=0;"'L2
      shape[1][100] = "func=rect;x=900;y=-180;width=50;height=40;bc=orange;pw=0;"'L2
      shape[1][101] = "func=rect;x=700;y=-240;width=50;height=40;bc=orange;pw=0;"'L3
      shape[1][102] = "func=rect;x=740;y=-210;width=50;height=40;bc=orange;pw=0;"'L3
      shape[1][103] = "func=rect;x=780;y=-180;width=50;height=40;bc=orange;pw=0;"'L3
      shape[1][104] = "func=rect;x=820;y=-150;width=50;height=40;bc=orange;pw=0;"'L3
      shape[1][105] = "func=rect;x=700;y=-150;width=50;height=40;bc=orange;pw=0;"'L4
      shape[1][106] = "func=rect;x=740;y=-120;width=50;height=40;bc=orange;pw=0;"'L4
      shape[1][107] = "func=rect;x=770;y=-450;width=50;height=40;bc=orange;pw=0;"'LU2
      shape[1][108] = "func=rect;x=800;y=-420;width=50;height=40;bc=orange;pw=0;"'LU2
      shape[1][109] = "func=rect;x=850;y=-390;width=50;height=40;bc=orange;pw=0;"'LU2
      shape[1][110] = "func=rect;x=820;y=-495;width=50;height=40;bc=orange;pw=0;"'LU3
      shape[1][111] = "func=rect;x=-480;y=-420;width=50;height=40;bc=orange;pw=0;"'RU1
      shape[1][112] = "func=rect;x=-520;y=-470;width=50;height=40;bc=orange;pw=0;"'RU1
      shape[1][113] = "func=rect;x=-560;y=-520;width=50;height=40;bc=orange;pw=0;"'RU1
      shape[1][114] = "func=rect;x=-500;y=-380;width=50;height=40;bc=orange;pw=0;"'R1
      shape[1][115] = "func=rect;x=-540;y=-340;width=50;height=40;bc=orange;pw=0;"'R1
      shape[1][116] = "func=rect;x=-580;y=-300;width=50;height=40;bc=orange;pw=0;"'R1
      shape[1][117] = "func=rect;x=-620;y=-260;width=50;height=40;bc=orange;pw=0;"'R1
      shape[1][118] = "func=rect;x=-660;y=-220;width=50;height=40;bc=orange;pw=0;"'R1
      shape[1][119] = "func=rect;x=-480;y=-330;width=50;height=40;bc=orange;pw=0;"'R2
      shape[1][120] = "func=rect;x=-500;y=-290;width=50;height=40;bc=orange;pw=0;"'R2
      shape[1][121] = "func=rect;x=-525;y=-260;width=50;height=40;bc=orange;pw=0;"'R2
      shape[1][122] = "func=rect;x=-560;y=-230;width=50;height=40;bc=orange;pw=0;"'R2
      shape[1][123] = "func=rect;x=-600;y=-200;width=50;height=40;bc=orange;pw=0;"'R2
      shape[1][124] = "func=rect;x=-640;y=-170;width=50;height=40;bc=orange;pw=0;"'R2
      shape[1][125] = "func=rect;x=-475;y=-240;width=50;height=40;bc=orange;pw=0;"'R3
      shape[1][126] = "func=rect;x=-500;y=-210;width=50;height=40;bc=orange;pw=0;"'R3
      shape[1][127] = "func=rect;x=-540;y=-180;width=50;height=40;bc=orange;pw=0;"'R3
      shape[1][128] = "func=rect;x=-580;y=-150;width=50;height=40;bc=orange;pw=0;"'R3
      shape[1][129] = "func=rect;x=-480;y=-150;width=50;height=40;bc=orange;pw=0;"'R4
      shape[1][130] = "func=rect;x=-520;y=-110;width=50;height=40;bc=orange;pw=0;"'R4
      shape[1][131] = "func=rect;x=-540;y=-430;width=50;height=40;bc=orange;pw=0;"'RU1
      shape[1][132] = "func=rect;x=-570;y=-390;width=50;height=40;bc=orange;pw=0;"'RU1
      shape[1][133] = "func=rect;x=-610;y=-360;width=50;height=40;bc=orange;pw=0;"'RU1
      shape[1][134] = "func=rect;x=-580;y=-480;width=50;height=40;bc=orange;pw=0;"'RU1
      shape[1][135] = "func=rect;x=-610;y=-460;width=50;height=40;bc=orange;pw=0;"'RU2
      shape[1][136] = "func=rect;x=-450;y=-470;width=80;height=40;angle=0;bc=DarkSlateGray;pc=black;pw=1;"'Roof1
      shape[1][137] = "func=rect;x=-360;y=-470;width=80;height=40;angle=0;bc=lightSlateGray;pc=black;pw=1;"'Roof1
      shape[1][138] = "func=rect;x=-270;y=-470;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof1
      shape[1][139] = "func=rect;x=-180;y=-470;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof1
      shape[1][140] = "func=rect;x=-90;y=-470;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof1
      shape[1][141] = "func=rect;x=0;y=-470;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof1
      shape[1][142] = "func=rect;x=90;y=-470;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof1
      shape[1][143] = "func=rect;x=180;y=-470;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof1
      shape[1][144] = "func=rect;x=270;y=-470;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof1
      shape[1][145] = "func=rect;x=360;y=-470;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof1
      shape[1][146] = "func=rect;x=450;y=-470;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof1
      shape[1][147] = "func=rect;x=540;y=-470;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof1
      shape[1][148] = "func=rect;x=630;y=-470;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof1
      shape[1][149] = "func=rect;x=-500;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][150] = "func=rect;x=-400;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][151] = "func=rect;x=-300;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][152] = "func=rect;x=-200;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][153] = "func=rect;x=-100;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][154] = "func=rect;x=0;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][155] = "func=rect;x=100;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][156] = "func=rect;x=200;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][157] = "func=rect;x=300;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][158] = "func=rect;x=400;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][159] = "func=rect;x=500;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][160] = "func=rect;x=600;y=-520;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][161] = "func=rect;x=700;y=-520;width=70;height=40;angle=0;bc=firebrick;pw=0;"'Roof2
      shape[1][162] = "func=rect;x=-450;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof3
      shape[1][163] = "func=rect;x=-350;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof3
      shape[1][164] = "func=rect;x=-250;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'R00r3
      shape[1][165] = "func=rect;x=-150;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'R00f3
      shape[1][166] = "func=rect;x=-50;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'R00f3
      shape[1][167] = "func=rect;x=50;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof3
      shape[1][168] = "func=rect;x=150;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof3
      shape[1][169] = "func=rect;x=250;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'R00f3
      shape[1][170] = "func=rect;x=350;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'R00f3
      shape[1][171] = "func=rect;x=450;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof3
      shape[1][172] = "func=rect;x=550;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'R00f3
      shape[1][173] = "func=rect;x=650;y=-570;width=80;height=40;angle=0;bc=firebrick;pw=0;"'R00f3
      shape[1][174] = "func=rect;x=-400;y=-620;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof4
      shape[1][175] = "func=rect;x=-300;y=-620;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof4
      shape[1][176] = "func=rect;x=-200;y=-620;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof4
      shape[1][177] = "func=rect;x=-100;y=-620;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof4
      shape[1][178] = "func=rect;x=0;y=-620;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof4
      shape[1][179] = "func=rect;x=100;y=-620;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof4
      shape[1][180] = "func=rect;x=200;y=-620;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof4
      shape[1][181] = "func=rect;x=300;y=-620;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof4
      shape[1][182] = "func=rect;x=400;y=-620;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof4
      shape[1][183] = "func=rect;x=500;y=-620;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof4
      shape[1][184] = "func=rect;x=600;y=-620;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof4
      shape[1][185] = "func=rect;x=-340;y=-670;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof5
      shape[1][186] = "func=rect;x=-240;y=-670;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof5
      shape[1][187] = "func=rect;x=-140;y=-670;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof5
      shape[1][188] = "func=rect;x=-40;y=-670;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof5
      shape[1][189] = "func=rect;x=60;y=-670;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof5
      shape[1][190] = "func=rect;x=160;y=-670;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof5
      shape[1][191] = "func=rect;x=260;y=-670;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof5
      shape[1][192] = "func=rect;x=360;y=-670;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof5
      shape[1][193] = "func=rect;x=460;y=-670;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof5
      shape[1][194] = "func=rect;x=560;y=-670;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof5
      shape[1][195] = "func=rect;x=-300;y=-720;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof6
      shape[1][196] = "func=rect;x=-200;y=-720;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof6
      shape[1][197] = "func=rect;x=-100;y=-720;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof6
      shape[1][198] = "func=rect;x=0;y=-720;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof6
      shape[1][199] = "func=rect;x=100;y=-720;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof6
      shape[1][200] = "func=rect;x=200;y=-720;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof6
      shape[1][201] = "func=rect;x=300;y=-720;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof6
      shape[1][202] = "func=rect;x=400;y=-720;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof6
      shape[1][203] = "func=rect;x=500;y=-720;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof6
      shape[1][204] = "func=rect;x=-250;y=-770;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof7
      shape[1][205] = "func=rect;x=-150;y=-770;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof7
      shape[1][206] = "func=rect;x=-50;y=-770;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof7
      shape[1][207] = "func=rect;x=50;y=-770;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof7
      shape[1][208] = "func=rect;x=150;y=-770;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof7
      shape[1][209] = "func=rect;x=250;y=-770;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof7
      shape[1][210] = "func=rect;x=350;y=-770;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof7
      shape[1][211] = "func=rect;x=450;y=-770;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof7
      shape[1][212] = "func=rect;x=-200;y=-820;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof8
      shape[1][213] = "func=rect;x=-100;y=-820;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof8
      shape[1][214] = "func=rect;x=0;y=-820;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof8
      shape[1][215] = "func=rect;x=100;y=-820;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof8
      shape[1][216] = "func=rect;x=200;y=-820;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof8
      shape[1][217] = "func=rect;x=300;y=-820;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof8
      shape[1][218] = "func=rect;x=400;y=-820;width=80;height=40;angle=0;bc=firebrick;pw=0;"'Roof8
      shape[1][219] = "func=rect;x=1000;y=-500;width=80;height=40;angle=0;bc=skyblue;pw=1;"'RR1
      shape[1][220] = "func=rect;x=1090;y=-500;width=80;height=40;angle=0;bc=SkyBlue;pw=1;"'RR1
      shape[1][221] = "func=rect;x=1180;y=-500;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR1
      shape[1][222] = "func=rect;x=1270;y=-500;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR1
      shape[1][223] = "func=rect;x=1360;y=-500;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR1
      shape[1][224] = "func=rect;x=1450;y=-500;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR1
      shape[1][225] = "func=rect;x=1540;y=-500;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR1
      shape[1][226] = "func=rect;x=1630;y=-500;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR1
      shape[1][227] = "func=rect;x=1000;y=-450;width=80;height=40;angle=0;bc=DarkSlateGray;pc=black;pw=2;"'RR2
      shape[1][228] = "func=rect;x=1090;y=-450;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR2
      shape[1][229] = "func=rect;x=1180;y=-450;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR2
      shape[1][230] = "func=rect;x=1270;y=-450;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR2
      shape[1][231] = "func=rect;x=1360;y=-450;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR2
      shape[1][232] = "func=rect;x=1450;y=-450;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR2
      shape[1][233] = "func=rect;x=1540;y=-450;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR2
      shape[1][234] = "func=rect;x=1630;y=-450;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR2
      shape[1][235] = "func=rect;x=1000;y=-400;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR3
      shape[1][236] = "func=rect;x=1090;y=-400;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR3
      shape[1][237] = "func=rect;x=1180;y=-400;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR3
      shape[1][238] = "func=rect;x=1270;y=-400;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR3
      shape[1][239] = "func=rect;x=1360;y=-400;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR3
      shape[1][240] = "func=rect;x=1450;y=-400;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR3
      shape[1][241] = "func=rect;x=1540;y=-400;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR3
      shape[1][242] = "func=rect;x=1630;y=-400;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR3
      shape[1][243] = "func=rect;x=1000;y=-350;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR4
      shape[1][244] = "func=rect;x=1090;y=-350;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR4
      shape[1][245] = "func=rect;x=1180;y=-350;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR4
      shape[1][246] = "func=rect;x=1270;y=-350;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR4
      shape[1][247] = "func=rect;x=1360;y=-350;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR4
      shape[1][248] = "func=rect;x=1450;y=-350;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR4
      shape[1][249] = "func=rect;x=1540;y=-350;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR4
      shape[1][250] = "func=rect;x=1630;y=-350;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR4
      shape[1][251] = "func=rect;x=1000;y=-300;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR5
      shape[1][252] = "func=rect;x=1090;y=-300;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR5
      shape[1][253] = "func=rect;x=1180;y=-300;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR5
      shape[1][254] = "func=rect;x=1270;y=-300;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR5
      shape[1][255] = "func=rect;x=1360;y=-300;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR5
      shape[1][256] = "func=rect;x=1450;y=-300;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR5
      shape[1][257] = "func=rect;x=1540;y=-300;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR5
      shape[1][258] = "func=rect;x=1630;y=-300;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR5
      shape[1][259] = "func=rect;x=1000;y=-250;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR6
      shape[1][260] = "func=rect;x=1090;y=-250;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR6
      shape[1][261] = "func=rect;x=1180;y=-250;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR6
      shape[1][262] = "func=rect;x=1270;y=-250;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR6
      shape[1][263] = "func=rect;x=1360;y=-250;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR6
      shape[1][264] = "func=rect;x=1450;y=-250;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR6
      shape[1][265] = "func=rect;x=1540;y=-250;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR6
      shape[1][266] = "func=rect;x=1630;y=-250;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR6
      shape[1][267] = "func=rect;x=1000;y=-200;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR7
      shape[1][268] = "func=rect;x=1090;y=-200;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR7
      shape[1][269] = "func=rect;x=1180;y=-200;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR7
      shape[1][270] = "func=rect;x=1270;y=-200;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR7
      shape[1][271] = "func=rect;x=1360;y=-200;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR7
      shape[1][272] = "func=rect;x=1450;y=-200;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR7
      shape[1][273] = "func=rect;x=1540;y=-200;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR7
      shape[1][274] = "func=rect;x=1630;y=-200;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR7
      shape[1][275] = "func=rect;x=1000;y=-150;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR8
      shape[1][276] = "func=rect;x=1090;y=-150;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR8
      shape[1][277] = "func=rect;x=1180;y=-150;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR8
      shape[1][278] = "func=rect;x=1270;y=-150;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR8
      shape[1][279] = "func=rect;x=1360;y=-150;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR8
      shape[1][280] = "func=rect;x=1450;y=-150;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR8
      shape[1][281] = "func=rect;x=1540;y=-150;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR8
      shape[1][282] = "func=rect;x=1630;y=-150;width=80;height=40;angle=0;bc=firebrick;pw=0;"'RR8
      shape[1][283] = "func=rect;x=-200;y=-840;width=680;height=10;angle=0;bc=silver;pw=0;"
      shape[1][284] = "func=rect;x=-380;y=-915;width=10;height=477;angle=48;bc=silver;pw=0;"
      shape[1][285] = "func=rect;x=650;y=-915;width=10;height=477;angle=-47;bc=silver;pw=0;"

    endsub

     
    Friday, November 3, 2017 10:51 AM
  • Maths Challenge

    Small Basic import IDs are 4 upper case letters followed by 2 numbers

    • How many possible combinations are there
    • Write a program to generate 1000 distinct (all different) random IDs
    • Can you speed the program up - HINT the IDs only need to 'appear' random


    Hi litdev, Small Basic import IDs are 3 upper case letters followed by 3 numbers.


    Nonki Takahashi

    Saturday, November 4, 2017 8:12 AM
    Moderator
  • A @Nonki - Thanks, I updated challenge
    Saturday, November 4, 2017 9:07 AM
    Moderator
  • Swinging SnowMan ID QSV888                                                                     mahreen miangul
    Saturday, November 4, 2017 11:51 AM
  • "2 numbers" should be "3 numbers" 

    Jan [ WhTurner ] The Netherlands

    Saturday, November 4, 2017 11:51 AM
    Answerer
  • Thanks Jan, I should set a challenge to spot my typos!
    Saturday, November 4, 2017 12:51 PM
    Moderator
  • This is my solution for the first challenge in the maths challenges: LGF321.

    Possible number of Small Basic Import ID combinations
    (full alphabet)
    = 26^3 * 10^3 = 17576000
    
    (except AEIOUY)
    = 20^3 * 10^3 = 8000000
    
    Press any key to continue...

    Nonki Takahashi


    Sunday, November 5, 2017 9:10 AM
    Moderator
  • This is my solution for the second challenge in the maths challenges: JGW676.

    • Windows 10 Home (64-bit)
    • Intel Core i5-3210M CPU @ 2.50GHz
    • Apple Mac mini / Parallels Desktop 12 for Mac 
    979 DBN002
    980 CLT054
    981 DKZ936
    982 GRD885
    983 FCN340
    984 VWK390
    985 BZG640
    986 BFF019
    987 GXB762
    988 QFX989
    989 XDV128
    990 RJW991
    991 WKC564
    992 WCX255
    993 RDZ094
    994 GDB947
    995 GXS279
    996 QKH022
    997 FNL698
    998 CGS735
    999 DGT642
    1000 DPD146
    1.71798 sec
    Press any key to continue...
    

    Nonki Takahashi

    Sunday, November 5, 2017 9:20 AM
    Moderator
  • This is my solution for the second challenge of the graphics challenges: SZG869-0.

    Screen shot of a program 3-D House 1.9


    Nonki Takahashi

    Sunday, November 5, 2017 2:51 PM
    Moderator
  • My solution of the pendulum challenge, with simulated air drag.

    ''pendulum   (physics challenge november 2017)     WhTurner
    rad=25
    line=shapes.AddLine(0,0,0,600)
    Shapes.Move(line,300,-250)
    ball=Shapes.addEllipse(2*rad,2*rad)
    Shapes.Move(ball,300-rad,350-rad)
    dot=6
    GraphicsWindow.DrawEllipse(300-dot/2,50-dot/2,dot,dot)
    GraphicsWindow.BrushColor="White"
    top=Shapes.AddRectangle(400,100)
    Shapes.Move(top,100,-50)
    GraphicsWindow.PenColor="White"
    refl=shapes.AddEllipse(10,15)
    Shapes.Move(refl,280,340)
    ampli=45
    For number=1 To 10   '' number of swings
      ampli=ampli*0.8  '' implementation of air drag
      For phase=1 To 360 Step 2
        phaser=math.GetRadians(phase)
        ang=ampli*math.Sin(phaser)
        Program.Delay(20)
        angr=math.GetRadians(ang)
        x=300-Math.sin(angr)*300
        y=50+math.Cos(angr)*300
        Shapes.Move(ball,x-rad,y-rad)
        Shapes.Move(refl,x-20,y-10)
        Shapes.Rotate(line,ang)
      endfor
    endfor
    


    Jan [ WhTurner ] The Netherlands

    Monday, November 6, 2017 12:29 PM
    Answerer
  • great house Nonki!

    some nice views of ur house in  ld3d viewer: LXJ881-0

    also interior view possible!


    • Edited by Tryhest Friday, November 10, 2017 4:21 AM
    Friday, November 10, 2017 4:18 AM
  • This is my solution for the third challenge in the maths challenges: JGW676-0.

    979 DWB991
    980 MQQ718
    981 XXK445
    982 LWM172
    983 PLS899
    984 RTX626
    985 BDK353
    986 LMG080
    987 SZM807
    988 JDW534
    989 GLR261
    990 SRM988
    991 QBD715
    992 SWB442
    993 ZMW169
    994 PSN896
    995 BXR623
    996 BTG350
    997 JSK077
    998 TSQ804
    999 DQT531
    1000 NGM258
    0.94548 sec
    Press any key to continue...
    

    Nonki Takahashi

    Friday, November 17, 2017 10:14 AM
    Moderator
  • This is my solution for the animation challenge: SXS341.

    Screen shot of a program Python


    Nonki Takahashi

    Friday, November 17, 2017 12:12 PM
    Moderator
  • Animation Challenge   WXB487  shortened version  SLG752

    Iridescent (insect) moving around

    *  added tactile sense moving ...  SLG752-2

    Saturday, November 18, 2017 7:11 AM
    Answerer
  • newyear is near... GPH887

    Saturday, November 18, 2017 5:26 PM
  • updated sinusoidal moving piton: SXS341-0
    Saturday, November 18, 2017 6:11 PM
  • This is my solution for the third challenge in the maths challenges: JGW676-0.


    Nonki Takahashi

    Hi, are these guaranteed to be unique?  It's the checking for distinct unqiue values that could make this slow.
    Saturday, November 18, 2017 7:12 PM
    Moderator
  • This is my solution for the third challenge in the maths challenges: JGW676-0.


    Nonki Takahashi

    Hi, are these guaranteed to be unique?  It's the checking for distinct unqiue values that could make this slow.

    Hi, litdev.  The alphabet may not be unique but the number will be unique.  Please check the following code.

    num = Math.GetRandomNumber(1000) - 1
    For n = 1 To 1000
      num = Math.Remainder(num + 727, 1000)
      a[num] = 1
    EndFor
    na = Array.GetItemCount(a)
    TextWindow.WriteLine(na)


    Nonki Takahashi

    Sunday, November 19, 2017 2:34 AM
    Moderator
  • Also the TextWindow.Writeline slows the program down:

    with TW.WL: 0.77 sec

    without   : 0.13 sec


    Jan [ WhTurner ] The Netherlands

    Sunday, November 19, 2017 9:22 AM
    Answerer
  • updated ny18 with nonki's xmasstree and robot: gph887-0

    Tuesday, November 21, 2017 8:32 AM
  • Animation Challenge   SLG752-3

    Iridescent (insect) moving around using its legs!!

    Tuesday, November 28, 2017 12:03 PM
    Answerer
  • Super cool NaochanON!
    Tuesday, November 28, 2017 7:05 PM
    Moderator