From 02b34b3ec50378d33f51d91480f55a6dead21bd0 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 4 Sep 2022 15:20:19 +0800 Subject: [PATCH] auto save --- 342.py | 16 ++++++++++++++++ diy2.py | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 342.py create mode 100644 diy2.py diff --git a/342.py b/342.py new file mode 100644 index 0000000..5674d1e --- /dev/null +++ b/342.py @@ -0,0 +1,16 @@ +username = "python" +userpassword = "123456" +while True: + name = input("请输入用户名:") + + if name == username and password == userpassword: + name = input("请输入账号") + break + if name != username: + + print("账号错误") + continue + password = input("请输入密码:") + if password != userpassword : + print("密码错误") +print("欢迎来到贝尔编程!") \ No newline at end of file diff --git a/diy2.py b/diy2.py new file mode 100644 index 0000000..4cfd09b --- /dev/null +++ b/diy2.py @@ -0,0 +1,17 @@ +username = "python" +userpassword = "123456" +while True: + name = input("请输入用户名:") + + if name == username and password == userpassword: + name = input("请输入账号") + break + if name != username: + + print("账号错误") + + continue + password = input("请输入密码:") + if password != userpassword : + print("密码错误") +print("欢迎来到贝尔编程!") \ No newline at end of file -- libgit2 0.25.0