首页 > 其他 > 详细

第一次作业

时间:2018-04-04 22:30:25      阅读:207      评论:0      收藏:0      [点我收藏+]
2.5
import turtle
turtle.setup(500,500)
turtle.penup()
turtle.fd(-50)
turtle.pendown()
turtle.pensize(10)
turtle.pencolor("blue")
turtle.pendown()
turtle.fd(50)
turtle.seth(-120)
turtle.fd(50)
turtle.seth(120)
turtle.fd(50)
turtle.seth(60)
turtle.fd(50)
turtle.seth(-60)
turtle.fd(100)
turtle.seth(180)
turtle.fd(100)
turtle.seth(60)
turtle.fd(50)
  2.6
import turtle
turtle.setup(500,500)
turtle.penup()
turtle.pensize(10)
turtle.fd(-50)
turtle.pencolor("pink")
turtle.pendown()
turtle.left(90)
turtle.fd(50)
turtle.penup()
turtle.fd(50)
for i in range(3):
    turtle.right(90)
    turtle.fd(50)
    turtle.pendown()
    turtle.fd(50)
    turtle.penup()
    turtle.fd(50)
2.7
import turtle
turtle.setup(500,500)
turtle.penup()
turtle.fd(-50)
turtle.pensize(10)
turtle.pencolor("red")
turtle.pendown()
turtle.left(30)
for i in range(6):
    turtle.left(60)
    turtle.fd(50)
    turtle.right(120)
    turtle.fd(50)
turtle.fd(50)
for i in range(5):
    turtle.right(60)
    turtle.fd(50)
2.8
from turtle import *
pensize(1)
pencolor("blue")
i=1
while(i<=160):
    seth(90)
    fd(i)
    seth(180)
    fd(i+1)
    seth(-90)
    fd(i+2)
    seth(0)
    fd(i+3)
    i=i+4
2.9
import turtle
turtle.setup(500,500)
turtle.penup()
turtle.fd(-200)
turtle.pensize(10)
turtle.pencolor("red")
turtle.pendown()
turtle.fd(70)
turtle.circle(-24,180)
turtle.fd(50)
turtle.pencolor("pink")
turtle.seth(70)
turtle.fd(90)
turtle.pencolor("red")
turtle.seth(-90)
turtle.fd(100)
turtle.circle(20,150)
turtle.fd(30)
turtle.circle(-100,40)
turtle.seth(0)
turtle.fd(30)
turtle.circle(-20,180)
turtle.fd(55)
turtle.pencolor("pink")
turtle.seth(65)
turtle.fd(80)
turtle.seth(-90)
turtle.fd(85)
turtle.circle(30,90)
turtle.seth(40)
for i in range(1):
    turtle.circle(-30,80)
    turtle.circle(30,80)

 

第一次作业

原文:https://www.cnblogs.com/qq-com/p/8719173.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!