Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / lesson4_5

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit dde49a1d authored a year ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

save project

parent 70ca84f3 c378641l777p219a8353/wx649118
Hide whitespace changes
Inline Side-by-side
Showing with 23 additions and 0 deletions
  • 1.py
1.py
View file @ dde49a1d
username = 'python'
password = '123456'
num = 3
while True:
if num > 0:
input__name = input("输入用户名:")
input_password = input("输入密码“")
if input__name != username:
print("用户名错误,请输入正确的用户名!")
continue
elif input_password != password:
num -= 1
print("密码错误,请输入正确密码! 还有" + str(num) + "次机会")
continue
else:
print("登录成功")
break
else:
print("今日登陆次数已达上限")
exit()
print("开始游戏")
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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