Commit fbdf4719 by BellCodeEditor

save project

parent 1f40a1d7
Showing with 27 additions and 13 deletions
......@@ -15,12 +15,15 @@
a = [12,51,451,61,584,209,6,2,5]
for i in range(0,len(a)):
index = i
for j in range(i+1,len(a)):
if a[j] < a[index]:
index = j
a[i] ,a[index] = a[index],a[i]
print(a)
\ No newline at end of file
# a = [12,51,451,61,584,209,6,2,5]
# for i in range(0,len(a)):
# index = i
# for j in range(i+1,len(a)):
# if a[j] < a[index]:
# index = j
# a[i] ,a[index] = a[index],a[i]
# print(a)
from tkinter import messagebox
for i in range(10):
messagebox.showerror('错误','未知***')
\ No newline at end of file
......@@ -29,10 +29,21 @@ def register(): # 注册验证
else:
users[name]=password1
content=json.dumps(users)
with open('user.txt','w',encoding='utf-8') as file:
file.write(content)
messagebox.showinfo('提示','用户注册成功')
reg_to_login()
#users=json.loads(info)
def login(): # 登录验证
pass
name,password=app_login.get_input()
pwd=users.get(name)
if pwd==password:
messagebox.showinfo('成功','登陆成功')
else:
messagebox.showerror('错误','用户名称或密码错误')
class My_login(): # 登录窗口
def __init__(self):
......
{"a": "123456"}
\ No newline at end of file
{"admin": "123456", "asd": "111", "qqq": "123"}
\ 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