Commit 09dd8759 by BellCodeEditor

save project

parent c2edc134
u = input()
w = u.split(',')
o = list(map(int,w))
q = 0
r = 0
p = 0
e = 0
g = 0
for i in range(0,len(o)-1):
if len(o) == 1:
print(0.0)
elif len(o) == 2:
if o[i]<o[i+1]:
if o[i]<0 and o[i+1]>0:
q = o[i+1]-o[i]-1
else:
q = o[i+1]-o[i]
print("%.1f"%q)
elif o[i] > o[i+1]:
if o[i+1]<0 and o[i]>0:
r = (o[i]-o[i+1]-1)*0.3
else:
r = (o[i]-o[i+1])*0.3
print("%.1f"%r)
else:
print(0.0)
elif len(o) > 2:
if o[i]<o[i+1]:
if o[i]<0 and o[i+1]>0:
p = o[i+1]-o[i]-1
else:
p = o[i+1]-o[i]
elif o[i] > o[i+1]:
if o[i+1]<0 and o[i]>0:
e = (o[i]-o[i+1]-1)*0.3
else:
e = (o[i]-o[i+1])*0.3
else:
g = 0.0
y = p+g+e
if len(o)>2:
print("%.1f"%y)
w_1 = int(input())
w_2 = []
w_3 = []
for i in range(0,w_1+1):
w_2.append(i)
for t in range(1,len(w_2)):
for y in range(0,len(w_2)):
for g in range(1,len(w_2)+1):
if t!=w_2[y] and t!=w_2[g-2*g] and w_2[g-2*g]!=w_2[y]:
h = 100*t+10*w_2[y]+w_2[g-2*g]
if h%2 ==1:
w_3.append(h)
w_4 = len(w_3)
print(w_4)
\ No newline at end of file
s = input()
L = s.split(',')
L = list(map(int,L))
o = L[0]+L[1]
for i in range(o) :
if o >= 180:
print('A')
elif o >= 160:
print('B')
elif o >=120:
print('C')
print(i)
n = int(input())
start = 10**(n-1)
end =10**n
for i in range(start,end):
if str(i)[::-1]==str(i):
print(i)
\ No newline at end of file
n = int(input())
L = list(range(n+1))
c = 0
for i in L:
if i != 0:
for b in L:
for d in L:
if i!=b and i!=d and b!=d and d%2 != 0:
c=c+1
print(c)
......@@ -28,14 +28,19 @@ def register(): # 注册验证
messagebox.showwarning('错误','两次密码不一致')
else:
users[name] = password1
content = json.dump(users)
content = json.dumps(users)
with open('user.txt','w',encoding='utf-8') as file:
file.write(content)
messagebox.showinfo('成功','注册成功')
login_show()
reg_to_login()
def login(): # 登录验证
def login(): # 登录验证
name,password = app_login.get_input()
pwd = users.get(name)
if pwd==password:
messagebox.showinfo('成功','登录成功')
else:
messagebox.showinfo('错误','用户名或密码错误')
class My_login(): # 登录窗口
def __init__(self):
......@@ -129,4 +134,4 @@ class My_register(): # 注册窗口
return self.name, self.password1, self.password2
app_login = My_login()
app_login.show()
\ No newline at end of file
app_login.show()
{"admin":"123456"}
{"admin": "123456", "q": "q"} "w": "w"}
\ 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