Commit 67317f8b by BellCodeEditor

save project

parent 25cbe3fb
Showing with 16 additions and 9 deletions
len=50#设置半径
#画画,画爱心
import turtle#调用海龟
import turtle
pen=turtle.Pen()#赋值变量
screen=turtle.Screen()
screen.bgcolor("green")
pen.pencolor("blue")
len1=screen.textinput("半径","你想要爱心中半圆的半径多大:")
len2=int(len1)
len3=float(len2)
len=len3#设置半径
#画画,画爱心
pen.pensize(10)
pen.left(45)
pen.forward(2*len)
pen.circle(len,180)
pen.right(90)
pen.circle(len,180)
pen.forward(2*len)
turtle.done()
pen.penup()
goto(10,0)
#写字
pen.write("你\n\n\n\n逼",font=("Times",30,"normal"))
pen.pensize(10)
\ No newline at end of file
pen.penup()
pen.goto(100,-100)
pen.write("你好啊\n\n\n逼",font=("Times",30,"normal"))
turtle.done()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment