Professional Documents
Culture Documents
SummarySlideshow Chapter4
SummarySlideshow Chapter4
Basic
For…EndFor
While…EndWhile
For…EndFor While…EndWhile
For A = 1 To 5
TextWindow.WriteLine (A) FALSE Check
whether A
EndFor <= 5
TRUE
For A = 1 To 5
TextWindow.WriteLine (A)
EndFor
Step
• If you want the variable value to be incremented by some
number (may be positive or negative) other than 1.
– You can use Step in the For statement.
©Oxford University Press Small Basic Looping Stateme 7
Step
• If you want the variable value to be incremented by some
number (may be positive or negative) other than 1.
– You can use Step in the For statement.
For A = 20 To 1 Step -4
TextWindow.WriteLine (A)
EndFor
Number = 1
While Number <= 15
TextWindow.WriteLine (Number)
Number = Number + 4
EndWhile
Height
x (x,y)
Width
(0,0) y
Height
x (x,y)
Width
DrawLine (x1, y1, x2, y2) • It draws a line from one point (x1,
y1) to another (x2, y2) using the
current pen.
DrawRectangle (x, y, w, h) • It draws a rectangle (width w,
height h) on the screen at (x, y)
using the current pen.
DrawTriangle(x1, y1, x2, • It draws a triangle using three
y2, x3, y3) points and the current pen.
2. GraphicsWindow
The ________________ is used to draw text and figures.
3. one
The default value of Step is ______________
4. DrawEllipse
The method to draw a circle is ____________
5. The ______________
PenColor property is used to set the colour of drawing pen.
2. True
You can also draw text in GraphicsWindow: ________
3. The default colour of the pen used for drawing figures on the
GraphicsWindow is black: ________ True
True
5. You can draw a square using DrawRectangle method: ________