Microsoft Small Basic
Program Listing: KGB537
GraphicsWindow.Width = 600
GraphicsWindow.Height = 600
GraphicsWindow.Left = 0
GraphicsWindow.Top = 0
GraphicsWindow.BackgroundColor = "Black"
GraphicsWindow.PenColor = "White"
Sub firework
Turtle.PenDown()
Turtle.Speed = 80
For loopcount = 1 To 9
Turtle.Move(70)
Turtle.Turn(160)
EndFor
Turtle.PenUp()
EndSub
Sub move_turtle
Turtle.PenUp()
Turtle.Speed = 80
Turtle.X = Math.GetRandomNumber(600)
Turtle.Y = Math.GetRandomNumber(600)
EndSub
Sub PenRed
GraphicsWindow.PenColor = "Red"
EndSub
Sub PenYellow
GraphicsWindow.PenColor = "Yellow"
EndSub
Sub PenBlue
GraphicsWindow.PenColor = "Blue"
EndSub
For mainloop = 1 To 10
PenRed()
move_turtle()
firework()
PenYellow()
move_turtle()
firework()
PenBlue()
move_turtle()
firework()
EndFor