码迷,mamicode.com
首页 > 其他好文 > 详细

第一次作业

时间:2018-04-04 23:31:19      阅读:229      评论:0      收藏:0      [点我收藏+]

标签:2.7   style   bsp   range   nbsp   enc   while   rtl   作业   

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)

 

第一次作业

标签:2.7   style   bsp   range   nbsp   enc   while   rtl   作业   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!