1. 程式人生 > >Python發射小心心

Python發射小心心

() setup lan nco 點擊 begin target python targe

import turtle
turtle.setup(700,700)
turtle.pensize(15)
turtle.seth(270)
turtle.fd(80)
turtle.seth(0)
turtle.fd(120)
turtle.seth(270)
turtle.fd(100)
turtle.seth(90)
turtle.fd(100)
turtle.seth(180)
turtle.fd(120)
turtle.seth(225)
turtle.fd(160)
turtle.seth(45)
turtle.fd(160)
turtle.seth(90)
turtle.fd(80)
turtle.seth(0)
turtle.fd(
110) turtle.seth(-45) turtle.fd(50) turtle.seth(135) turtle.fd(50) turtle.seth(180) turtle.fd(110) turtle.seth(90) turtle.fd(30) turtle.seth(0) turtle.fd(110) turtle.seth(45) turtle.fd(50) turtle.seth(225) turtle.fd(50) turtle.seth(180) turtle.fd(110) turtle.seth(90) turtle.fd(90) turtle.seth(0) turtle.circle(80,360) turtle.seth(
90) turtle.penup() turtle.fd(90) turtle.seth(0) turtle.fd(30) turtle.seth(90) turtle.pendown() turtle.fd(10) turtle.penup() turtle.seth(180) turtle.fd(60) turtle.seth(270) turtle.pendown() turtle.fd(10) turtle.pensize(10) turtle.penup() turtle.fd(40) turtle.pendown() turtle.seth(-60) turtle.circle(45,125) turtle.seth(
-15) turtle.penup() turtle.fd(190) turtle.seth(-90) turtle.fd(80) turtle.begin_fill() turtle.pencolor("black") turtle.fillcolor("red") turtle.penup() turtle.seth(135) turtle.pendown() turtle.circle(50,60) turtle.penup() turtle.seth(-135) turtle.pendown() turtle.circle(50,100) turtle.fd(40) turtle.penup() turtle.seth(25) turtle.pendown() turtle.fd(40) turtle.circle(50,120) turtle.penup() turtle.seth(-175) turtle.pendown() turtle.circle(34,76) turtle.end_fill() turtle.exitonclick()

點擊此處查看視頻

Python發射小心心