zoukankan      html  css  js  c++  java
  • 9.12作业

    a.五角星

    import turtle
    turtle.color('yellow')
    turtle.bgcolor('red')
    turtle.fillcolor('yellow')
    def mytogo(x,y):
    turtle.up()
    turtle.goto(x,y)
    turtle.down()
    mytogo(-300,100)
    turtle.begin_fill()
    for i in range(5):
    turtle.forward(120)
    turtle.right(144)
    turtle.end_fill()

    b.同心圆

    import turtle
    for i in range(4):
    turtle.up()
    turtle.goto(0,-20*(i+1))
    turtle.down()
    turtle.circle(20*(i+1))

    c.太阳花

    import turtle
    turtle.color('yellow','red')
    turtle.begin_fill()
    while True:
    turtle.forward(200)
    turtle.left(175)
    if(abs(turtle.pos()))<1:
    break
    turtle.end_fill()

    d.五个五角星

    import turtle
    turtle.color('yellow')
    turtle.bgcolor('red')
    turtle.fillcolor('yellow')
    def mytogo(x,y):
    turtle.up()
    turtle.goto(x,y)
    turtle.down()
    mytogo(-300,100)
    turtle.begin_fill()
    for i in range(5):
    turtle.forward(120)
    turtle.right(144)
    turtle.end_fill()
    mytogo(-200,200)
    turtle.begin_fill()
    for i in range(5):
    turtle.forward(50)
    turtle.right(144)
    turtle.end_fill()
    mytogo(-140,120)
    turtle.begin_fill()
    for i in range(5):
    turtle.forward(50)
    turtle.right(144)
    turtle.end_fill()
    mytogo(-140,40)
    turtle.begin_fill()
    for i in range(5):
    turtle.forward(50)
    turtle.right(144)
    turtle.end_fill()
    mytogo(-200,-40)
    turtle.begin_fill()
    for i in range(5):
    turtle.forward(50)
    turtle.right(144)
    turtle.end_fill()

  • 相关阅读:
    CSP-S2019 括号树
    [CQOI2007]余数求和
    CF1000E We Need More Bosses
    [HAOI2009]毛毛虫
    ls命令
    HTML的标签 属性 等等
    虚拟机安装Tools
    1.1 什么是安全渗透
    004-Kali Linux安装-熟悉环境
    003-Kali Linux 安装-持久加密USB安装、熟悉环境、熟悉BASH命令
  • 原文地址:https://www.cnblogs.com/chenyanxi123/p/7509560.html
Copyright © 2011-2022 走看看