Commit eaa7b9b5 by BellCodeEditor

save project

parent 7f1e4ec2
Showing with 10 additions and 2 deletions
...@@ -3,7 +3,7 @@ d= "123456" # 保存在服务器数据库中的用户密码(正确的密码 ...@@ -3,7 +3,7 @@ d= "123456" # 保存在服务器数据库中的用户密码(正确的密码
w="0" w="0"
i="0" i="0"
import turtle import turtle
while not u==w and not d==i: while u!=w or d!=i:
w=input("账号:") w=input("账号:")
i=input("密码:") i=input("密码:")
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
...@@ -11,7 +11,14 @@ while not u==w and not d==i: ...@@ -11,7 +11,14 @@ while not u==w and not d==i:
print("登陆成功!") print("登陆成功!")
print("欢迎来到贝尔编程!") print("欢迎来到贝尔编程!")
p=turtle.Pen() p=turtle.Pen()
p.write("欢迎你!创造师!\n快和我一起进入奇妙的编程世界吧!")
p.hideturtle()
turtle.done() turtle.done()
else: else:
print("账号或密码错误!") if u!=w and d!=i:
print("账号和密码错误!")
if u!=w and d==i:
print("账号输入错误!")
if u==w and d!=i:
print("密码输入错误!")
# 如果用户输入的账号、密码正确,提示登陆成功 # 如果用户输入的账号、密码正确,提示登陆成功
\ 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