Professional Documents
Culture Documents
IT Tutorial (November-Term 2) - Ricky
IT Tutorial (November-Term 2) - Ricky
Write programs to draw shapes use with basic commands: Pen color, pen
width, background color and hide the turtle.
Shape 1A
Turtle.Show()
GraphicsWindow.PenColor="Blue"
GraphicsWIndow.BackgroundColor="Pink"
GraphicsWindow.PenWidth=3
Turtle.Move(50)
Turtle.TurnLeft()
Turtle.Move(150)
Turtle.TurnRight()
Turtle.Move(150)
Turtle.TurnRight()
Turtle.Move(150)
Turtle.TurnLeft()
Turtle.Move(50)
Turtle.TurnLeft()
Turtle.Move(200)
Turtle.TurnLeft()
Turtle.Move(250)
Turtle.TurnLeft()
Turtle.Move(200)
Turtle.Hide()
Shape 2A
Turtle.Show()
GraphicsWindow.PenColor="Red"
GraphicsWIndow.BackgroundColor="Pink"
GraphicsWindow.PenWidth=4
Turtle.Turn(45)
Turtle.Move(200)
Turtle.Turn(135)
Turtle.Move(200)
Turtle.Turn(90)
Turtle.Move(200)
Turtle.Turn(135)
Turtle.Move(100)
Turtle.Hide()