1. a. For…EndFor b. Graphic window c. Step d. Black e. DrawRectangle 2. a. True b. False c. False d. True e. True 3. a. (iv) 20 16 12 b. (ii) 3. c. (iv) GraphicsWindow. FillRectangle (100, 100, 100, 100) d. (iv) GraphicsWindow. Height = 400 e. (iv) Both i and iii
Descriptive Type Questions
1) A loop is used to repeat a block of statements a number of times. There are two looping Statements available in Small Basic a. For…EndFor b. While…EndWhile 2) The default Value of Step in For…EndFor is 1. You can give a positive, a negative, or decimal value to the Step command. Consider the following code: For A = 20 To 1 Step – 3 TextWindow. WriteLine (A) EndFor. 3) The GraphicWindow Object is used to lines and Shapes, and also print. Default Value of width is 624 and for Height is 444. 4) Pencolor It sets the color of the pen to draw shapes on the graphics window. Brush color It sets the color of the brush which is used to fill shapes drawn on the graphics window. 5) GraphicsWindow. Font Name = “Times New Roman ” GraphicsWindow. Font Size = “40” GraphicsWindow. Font Bold = “true” GraphicsWindow. Font Italic = “true” GraphicsWindow. Brush color = “yellow” GraphicsWindow. DrawText = (40, 40, “Fun with Small Basic”)
APPLICATION BASED QUESTIONS
a. i) 10 14 18 ii) 3 times b. A = 10 While A< 20 Textwindow. WrtieLine (A) A=A+4 EndWhile. c. i) GraphicsWindow. BrushColor = “yellow” ii) GraphicsWindow. BackgroundColor = “green” iii) GraphicsWindow. BrushColor = “pink” d. i) It draws an ellipse (width w height h) at (x, y) on the Screen using the current pen. ii) It fills an ellipse ( width w, height h) on the Screen at (x, y) using the brush color “Red”