miniproject1

# miniproject1 - if houseSize> lotSize print'The house is...

This preview shows pages 1–2. Sign up to view the full content.

#Katie Flint #Collaborated with Jennifer Irwin [email protected] def square(t,length): for side in range (4): forward(t,30) turn(t,90) def triangle(t,length): for side in range (3): forward (t,30) turn (t,-120) def circle (t,length): for side in range (18): turn(t,35) forward(t,10) def house(t,height): turn(t,90) square(t,30) triangle(t,30) def tree(t, height): forward(t,20) turnLeft(t) circle(t,10) turnLeft(t) def newNeighborhood(t,height): for side in range (1): forward(t,90) turn(t,0) triangle(t,30) #Welcome to the Neighborhood! def cityPlan(houses,lotSize,houseSize,treeHeight): if houseSize < 0 and lotSize <0 and houses <0 and treeHeight <0: print 'Sizes specified must be positive numbers'

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: if houseSize > lotSize: print 'The house is too big for the lot' x=houses*lotSize y=houseSize*4 world=makeWorld(x,y) t=makeTurtle(world) penUp(t) moveTo(t,0,y-1) penDown(t) for i in range (houses-1): house(t,10) forward(t,30) turnRight(t) forward(t,30) turnLeft(t) penUp(t) forward(t,30) penDown(t) turnLeft(t) tree(t,treeHeight/2) penUp(t) turnRight(t) forward(t,houseSize) turnLeft(t) forward(t,10) turnLeft(t) penDown(t) house(t,10) forward(t,30) turnRight(t) forward(t,30) turnLeft(t) forward(t,20) turn(t,-90) newNeighborhood(t,90) penUp(t) moveTo(t,0,0)...
View Full Document

## This document was uploaded on 10/26/2011 for the course CS 1315 at Georgia Tech.

### Page1 / 2

miniproject1 - if houseSize> lotSize print'The house is...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online