Commit 032fbc9f by BellCodeEditor

save project

parent 321d7bd7
Showing with 7 additions and 26 deletions
# 利用write()帮助悟空给诺依回信吧~ username = "python"
import turtle userpassword = "123456"
#背景颜色 name = input("请输入用户名")
screen=turtle.Screen() password = input("请输入密码")
screen.bgcolor("light blue") if name == username and password == userpassword:
#写字 print("登录成功")
pen=turtle.Pen() \ No newline at end of file
pen.penup()
pen.goto(100,-100)
pen.write("诺依,\nturtle真好用,\n我会在画布上写字啦!",font=("Times",10,"normal"))
pen.hideturtle()
#画爱心
pen1=turtle.Pen()
pen1.pencolor("red")
pen1.pensize(5)
#借助变量
len=60
pen1.left(45)
pen1.forward(2*len)
pen1.circle(len,180)
pen1.right(90)
pen1.circle(len,180)
pen1.forward(2*len)
pen1.hideturtle()
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