CS 1301 Recitation 10 10_27

CS 1301 Recitation 10 10_27 - y =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
>>>import turtle >>> turtle.forward(10) >>> turtle.right(90) >>> turtle.right(90) >>> def spirograph(size): for i in range(36): turtle.forward(size) turtle.right(130) >>> spirograph(20) >>> turtle.reset() >>> spirograph(20) >>> def spiral(length): for t in range(1, length*100): x = .02*t*math.sin(t/(180*math.pi))
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: y = .02*t*math.cos(t/(180*math.pi)) turtle.goto(x, y) >>> import math >>> spiral(50) >>> turtle.position() (0.00,0.00) >>> turtle.xcor() 0.0 >>> import urllib >>>connection = urllib.urlopen("http://weather.gov/30332") >>> data = connection.read() >>> print data >>> connection.close()...
View Full Document

This note was uploaded on 02/16/2012 for the course CS 1301 taught by Professor Staff during the Fall '08 term at Georgia Institute of Technology.

Ask a homework question - tutors are online