Commit d61027bb by BellCodeEditor

save project

parent fa625018
Showing with 47 additions and 13 deletions
i=0
while i<6:
print(i)
i+=1
\ No newline at end of file
i=0
while i<=10:
if i%2==0:
print(i)
i+=1
else:
i+=1
\ No newline at end of file
count=0
while True:
print("count的值为"+str(count))
if count==5:
count+=1
continue
if count==10:
break
count+=1
print("程序结束")
...@@ -2,21 +2,32 @@ username = "python" # 保存在服务器数据库中的用户账号(正确 ...@@ -2,21 +2,32 @@ username = "python" # 保存在服务器数据库中的用户账号(正确
userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码) userpassword = "123456" # 保存在服务器数据库中的用户密码(正确的密码)
# 请用input()实现用户输入账号、密码的功能 # 请用input()实现用户输入账号、密码的功能
i=3
while True: while True:
print("输入你的账号、密码") if i>0:
a=input("账号:")
b=input("密码:") print("输入你的账号、密码")
if username==a and userpassword==b: a=input("账号:")
print("登录成功!") b=input("密码:")
break if username==a and userpassword==b:
if username!=a: print("登录成功!")
print("账号错误!请重新输入") break #跳出循环
if username==a: if username!=a:
if userpassword!=b : print("账号错误!请重新输入")
print("密码错误!请重新输入") i-=1
print("温馨提示:您还有"+str(i)+"次机会")
elif userpassword!=b :
print("密码错误!请重新输入")
i-=1
print("温馨提示:您还有"+str(i)+"次机会")
else:
print("您的账户已被锁定,请带身份证来我司解锁")
exit() #退出程序
print("欢迎来到贝尔编程!") print("欢迎来到贝尔编程!")
#continue跳出本次循环
......
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