From 9ce36d08b57a6b1db426dd164991485a8f3e0ac0 Mon Sep 17 00:00:00 2001
From: BellCodeEditor <bellcode_dev@bell.ai>
Date: Sat, 31 Jul 2021 09:29:23 +0800
Subject: [PATCH] save project

---
 diy2.py | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/diy2.py b/diy2.py
index 0b10907..a707156 100644
--- a/diy2.py
+++ b/diy2.py
@@ -1,4 +1,19 @@
 username = "python"
 userpassword = "123456"
-
-print("欢迎来到贝尔编程!")
\ No newline at end of file
+i=3
+while True:
+    if i>0:
+        name = input("请输入用户名:")
+        password = input("请输入密码:")           
+        if name == username and password == userpassword:
+            print("登录成功!")
+            break
+        if name != username:
+            print("用户名错误")
+        if password !=userpassword:
+            print("密码错误")
+            i-=1
+    else:
+            print("你的账号已被锁定")
+            exit()
+print("欢迎来到贝尔编程!") 
\ No newline at end of file
--
libgit2 0.25.0