Boat

Task 1

Create the Python program below to draw a boat.

Code

from turtle import *
screen = getscreen()
tom = Turtle()

tom.fillcolor("brown")

# Boat
tom.begin_fill()
tom.forward(100)
tom.left(45)
tom.forward(50)
tom.left(135)
tom.forward(180)
tom.left(135)
tom.forward(50)
tom.end_fill()

# Move to top of boat
tom.left(45)
tom.forward(50)
tom.left(90)

# Sail
tom.forward(150)
tom.right(135)
tom.forward(100)
tom.right(135)
tom.forward(70)

Task 2

Add water to the scene by drawing a blue rectangle.

  1. Set colour to blue
  2. Begin fill
  3. Draw rectangle
  4. End fill
  5. Move to boat start position
  6. Set colour to brown
  7. Begin fill
  8. Draw boat
  9. End fill

This code would draw a blue rectangle.

tom.fillcolor("blue")
tom.begin_fill()
tom.forward(400)
tom.right(90)
tom.forward(100)
tom.right(90)
tom.forward(400)
tom.right(90)
tom.forward(100)
tom.right(90)
tom.end_fill()

 

Challenges

Improve the graphic by adding the following:

  • Sky
  • Clouds
  • Flag
  • Waves

Targets

State the commands to colour shapes

Identify the correct commands needed to solve a problem

Write a Python program to draw a boat