Sample shape and design programs in Python Turtle. 

Key Vocabulary:  Functions and Loops/Iteration

Functions:  Lists of commands.  Programmer can create functions to do several commands.

Example: Creates Function "Square()" that will draw a square later in the program.

def Square():
    for i in range(4):
       forward(100)
       right(90)



Loops or Iteration: Do something more than once.

Example: Draws four sides of a square:

for i in range(4):
   forward(100)
   right(90)


To program designs in Python Turtle:

1. Open Kwrite (or any text editing program)
2. Choose a program and type the program into Kwrite.
3. Save into your file area as "LastnameDesign.py"
4. Click on the "Home" icon.
5. Find your file area (Click on "NeboMusicWork -> Grade -> Teacher -> Your Name")
6. Press F4 on the keyboard.
7. Type "python LastnameDesign.py"

# Simple Square Program

from turtle import *

# Define Functions for Square

def Square():
    for i in range(4):
       forward(100)
       right(90)

# Main Method

Square()

input=raw_input()


# Square Flower Program

from turtle import *

# Define Functions for Square and Flower

def Square():
    for i in range(4):
       forward(100)
       right(90)

def FlowerSquare():
    for i in range(20):
       Square()
       right(20)

# Main Method

FlowerSquare()

input=raw_input()


# Spiral Program

from turtle import *

# Define Functions for Spiral

def Spiral():
    for i in range(20):
        Circle(50)
        right(20)

# Main Method

Spiral()

input=raw_input()


# Growing Spiral Program

from turtle import *

# Define Functions for Growing Spiral

def Shell(size):
    for i in range(30):
       circle(size)
       right(20)
       size=size+3

# Main Method

Shell(10)
      
input=raw_input()