Square
Task 1
Create the Python program below to draw a square.
from turtle import * screen = getscreen() tom = Turtle() tom.forward(200) tom.right(90) tom.forward(200) tom.right(90) tom.forward(200) tom.right(90) tom.forward(200)
Task 2
Create a new program that will draw a rectangle.
- A rectangle has 2 different side lengths
- A short side and a long side
from turtle import * screen = getscreen() tom = Turtle() tom.forward(200) tom.right(90) tom.forward(100) tom.right(90) tom.forward(200) tom.right(90) tom.forward(100)
Task 3
Create a new program that will draw a diamond.
- Turn before drawing a square
from turtle import * screen = getscreen() tom = Turtle() tom.right(45) tom.forward(200) tom.right(90) tom.forward(200) tom.right(90) tom.forward(200) tom.right(90) tom.forward(200)
Challenges
Write programs that generate the graphics shown below. An animated GIF shows one possible drawing order, but your program does not need to follow that exact sequence.