Cool Colorful shapes

import turtle

def main():

    turtle.pensize(3)

    turtle.penup()

    turtle.goto(-200, -50)

    turtle.pendown()

    turtle.begin_fill()

    turtle.color("red")

    turtle.circle(40, steps=3)

    turtle.end_fill()

    turtle.penup()

    turtle.goto(-100, -50)

    turtle.pendown()

    turtle.begin_fill()

    turtle.color("blue")

    turtle.circle(40, steps=4)

    turtle.end_fill()

    turtle.penup()

    turtle.goto(0, -50)

    turtle.pendown()

    turtle.begin_fill()

    turtle.color("green")

    turtle.circle(40, steps=5)

    turtle.end_fill()

    turtle.penup()

    turtle.goto(100, -50)

    turtle.pendown()

    turtle.begin_fill()

    turtle.color("yellow")

    turtle.circle(40, steps=6)

    turtle.end_fill()

    turtle.penup()

    turtle.goto(200, -50)

    turtle.pendown()

    turtle.begin_fill()

    turtle.color("purple")

    turtle.circle(40)

    turtle.end_fill()

    turtle.color("green")

    turtle.penup()

    turtle.goto(-100, 50)

    turtle.pendown()

    turtle.write(("Cool Colorful shapes"),

                font=("Times", 18, "bold"))

    turtle.hideturtle()

    turtle.done

    turtle.exitonclick()

if __name__ == '__main__':

    main()

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Turtle库是Python语言中一个很流行的绘制图像的函数库,想象一个小乌龟,在一个横轴为x、纵轴为y的坐标系原...
    yeszao阅读 3,077评论 1 5
  • 本次运用python的一个绘图库turtle,画了一朵玫瑰花,如果有一位可爱的小姐姐看到,那就送给你啦!效果如下:...
    debrogile阅读 302评论 1 0
  • # !/usr/bin/env python3 # -*- coding: utf-8 -*- # @Author...
    风中追风_3e95阅读 201评论 0 0
  • 最里面还提到过一个要点就是:活在身体的此时此刻。此话怎讲?当下身体不错,就可以出发,抬腿走就是,不必终日琢磨以后的...
    花落人往昔阅读 150评论 0 0
  • 春日飘雨的晚上,为了等待值班晚归的父亲,我尝试了第一次开夜车。 01 惊蛰之后,天气回暖,万物萌动。没想到春分时节...
    水木佳阅读 1,037评论 4 4