标签:info main def got mamicode set inf load ora
from turtle import *
def moveto(x,y):
penup()
goto(x,y)
pendown()
def main():
setup(800, 600)
speed(0)
for radius in range(20, 200, 20):
moveto(0, -radius)
circle(radius)
hideturtle()
done()
if __name__ == ‘__main__‘:
main()
from turtle import *
def moveto(x,y):
penup()
goto(x,y)
pendown()
def main():
setup(800, 600)
speed(0)
for radius in range(180, 0, -20):
moveto(0, -radius)
circle(radius)
hideturtle()
done()
if __name__ == ‘__main__‘:
main()
from turtle import *
from random import random
def moveto(x,y):
penup()
goto(x,y)
pendown()
def main():
setup(800, 600)
speed(0)
for radius in range(180, 0, -20):
moveto(0, -radius)
rgb = tuple(random() for i in range(3))
begin_fill()
circle(radius)
end_fill()
hideturtle()
done()
if __name__ == ‘__main__‘:
main()
from turtle import *
def square(size=50, rgb = ‘orange‘):
pencolor(rgb)
for i in range(4):
fd(size)
left(90)
def main():
setup(800, 600)
speed(0)
for i in range(6):
square(80)
left(60)
hideturtle()
done()
if __name__ == ‘__main__‘:
main()
from turtle import *
setup(800, 600)
pencolor(‘pink‘)
for i in range(4):
for i in range(5):
circle(80, 90)
left(90)
circle(80,90)
right(90)
hideturtle()
done()
from turtle import *
speed(0)
setup(800, 600)
bgcolor(‘black‘)
pencolor(‘white‘)
angle = 0
size = 2
for i in range(10):
for j in range(4):
fd(size)
angle += 91
seth(angle)
size += 5
hideturtle()
done()
标签:info main def got mamicode set inf load ora
原文地址:https://www.cnblogs.com/gjxy/p/14899169.html