python画画代码(超简单)
第一种
import turtle
t = turtle.Turtle()
for x in range(50 ):
t.fd( x*2 )
t.left(90)
第二种
import turtle
t =turtle.Turtle()
colors = ['red','blue','black','grey','yellow','purple','white','brown','green','pink','aqua','aquamarine''beige','chocolate','ivory','khaki','lavender','maroon','mauve','navy','olive','salmon','violet' ]
for x in range(50):
t.color(colors)
t.circle(x)
t.left(100)
第三种
import turtle
t = turtle.Turtle()
for x in range(180):
t.circle(50)
t.left(2)
还有很多基础画画,下次再发{:10_332:}{:5_95:}
页:
[1]