Commit f2744d81 by BellCodeEditor

save project

parent 2dc63af3
Showing with 23 additions and 21 deletions
i = 3 import turtle 
username = "python" #背景颜色
userpassword = "123456" screen=turtle.Screen()
while True: screen.bgcolor("light blue")
name = input("请输入用户名:") #写字
password = input("请输入密码:") pen=turtle.Pen()
i -=1 pen.penup()
if name == username and password == userpassword: pen.goto(100,-100)
print("登录成功!") pen.write("Hi,诺依~\n用python写电子贺卡真是太有趣啦~\n我也喜欢python~\n——悟空 ",font=("Times",20,"normal"))
break pen.hideturtle()
if name != username: #画爱心
print("用户名错误!") pen1=turtle.Pen()
continue pen1.pencolor("red")
if password != userpassword: pen1.pensize(5)
print("密码错误!") pen1.left(45)
print("用户名和密码!错误请重新输入") pen1.forward(100)
else: pen1.circle(50,180)
print("哈") pen1.right(90)
exit() pen1.circle(50, 180)
print("欢迎来到贝尔编程!") pen1.forward(100)
\ No newline at end of file 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