用python画一个奥特曼,把代码写出来
时间: 2023-02-18 07:40:09 浏览: 833
python-奥特曼.py
import turtle
turtle.speed(10)
turtle.pensize(3)
# 画头
turtle.penup()
turtle.goto(0, -100)
turtle.pendown()
turtle.circle(100)
# 画眼睛
turtle.penup()
turtle.goto(-20, -60)
turtle.pendown()
turtle.circle(15)
turtle.penup()
turtle.goto(20, -60)
turtle.pendown()
turtle.circle(15)
# 画嘴巴
turtle.penup()
turtle.goto(-30, -110)
turtle.pendown()
turtle.right(90)
turtle.forward(50)
# 画腿
turtle.penup()
turtle.goto(-30, -200)
turtle.pendown()
turtle.right(45)
turtle.forward(50)
turtle.penup()
turtle.goto(30, -200)
turtle.pendown()
turtle.left(90)
turtle.forward(50)
# 画手臂
turtle.penup()
turtle.goto(-80, -150)
turtle.pendown()
turtle.right(45)
turtle.forward(50)
turtle.penup()
turtle.goto(80, -150)
turtle.pendown()
turtle.left(90)
turtle.forward(50)
# 画胸口花纹
turtle.penup()
turtle.goto(-50, -50)
turtle.pendown()
turtle.circle(20)
turtle.penup()
turtle.goto(50, -50)
turtle.pendown()
turtle.circle(20)
turtle.done()
阅读全文