Lesson 6
Lesson 6
BASIC
OBJECTIVES
To use the RandomNumber function to generate random coordinates
To use the RandomColor function to get a random colour
To use a WhileEndWhile loop
SCREEN BURN
SCREENSAVERS
https://www.youtube.com/watch?v=6gMTYTDQLbM
MAKING A SCREENSAVER
A screensaver has moving objects on the screen
It continues indefinitely
DESIGN YOUR OWN SCREENSAVER!
Colour = GraphicsWindow.GetRandomColor()
GraphicsWindow.BrushColor = Colour
USING A WHILEENDWHILE LOOP
To make a section of code repeat indefinitely, you can use a
While.Endwhile loop
'Make the program continue until the user presses End Program
ContinueForEver = "Yes"
While ContinueForEver = "Yes"
'insert program statements in here
EndWhile