OBJECTIVE: Make a house. We will learn to move Python turtle using simple direction commands.
CODE:
import turtle
adam=turtle.Turtle()
adam.fillcolor("blue")
adam.begin_fill()
adam.forward(100)
adam.right(90)
adam.forward(100)
adam.right(90)
adam.forward(100)
adam.right(90)
adam.forward(100)
adam.end_fill()
adam.fillcolor("red")
adam.begin_fill()
adam.right(45)
adam.forward(70)
adam.right(90)
adam.forward(70)
adam.end_fill()
adam.fillcolor("green")
adam.right(45)
adam.forward(100)
adam.begin_fill()
adam.right(90)
adam.forward(30)
adam.right(90)
adam.forward(70)
adam.left(90)
adam.forward(40)
adam.left(90)
adam.forward(70)
adam.end_fill()