Commit 4bc105a9 by BellCodeEditor

auto save

parent 05c21ec4
Showing with 33 additions and 0 deletions
import turtle
pen=turtle.Pen()
pen.forward(100)
turtle.done()
\ No newline at end of file
import turtle
screen=turtle.Screen()
screen.textinput("问?","你叫什么名字?")
turtle.done()
\ No newline at end of file
import turtle#导入turtle模块
import turtle#导入turtle模块
screen=turtle.Screen()#赋值给screen(屏幕)
len=screen.textinput("提问","你想要多大的爱心?")#输出赋值
lovesize=int(len)#改变数值类型
len=screen.bgcolor("pink")#给屏幕染上颜色
pen=turtle.Pen()#给画笔赋值
pen.penup()#抬笔
pen.goto(100,-100)#改变坐标
pen.write("我的宝贝们!\n晚上好\n我宣布个事\n我爱你们",font=("Times",20,"normal"))#书写内容,writle(写)
#导入turtle模块
import turtle
pen1=turtle.Pen()#赋值给pen1
pen1.pensize(5)#爱心粗细
pen1.pencolor("red")#爱写颜色
pen1.left(45)#画爱心,调整45角度
pen1.forward(2*lovesize)#可控爱心大小 circle(圆圈)
pen1.circle(lovesize,180)#可控爱心大小
pen1.right(90)#画爱心,向右调整角度
pen1.circle(lovesize,180)#可控爱心大小
pen1.forward(2*lovesize)#可控爱心大小
pen1.hideturtle()#隐藏画笔/箭头
turtle.done()#保存画布
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