Commit d53589d5 by BellCodeEditor

auto save

parent 1392ba3f
Showing with 21 additions and 4 deletions
username="python"
userpass="123456"
name=input("请输入用户名:")
pas=input("请输入密码:")
if name==username and pas==userpass:
print("登录成功!欢迎来到贝尔编程!")
else:
print("登录失败,用户名或密码错误!")
username="python"
userpass="123456"
name=input("请输入用户名:")
pas=input("请输入密码:")
if name==username and pas==userpass:
print("登录成功!欢迎来到贝尔编程!")
else:
print("登录失败,用户名或密码错误!")
with open(r'c:\Users\23636\Desktop\sales_list.txt','r',encoding='utf-8') as file: with open(r'c:\Users\23636\Desktop\soccer.txt','r',encoding='utf-8') as file:
a=file.readlines() a=file.readlines()
# print(a) # print(a)
for i in a: for i in a:
...@@ -7,5 +7,4 @@ with open(r'c:\Users\23636\Desktop\sales_list.txt','r',encoding='utf-8') as file ...@@ -7,5 +7,4 @@ with open(r'c:\Users\23636\Desktop\sales_list.txt','r',encoding='utf-8') as file
sum=0 sum=0
for sales in data[1:]: for sales in data[1:]:
sum=sum+int(sales) sum=sum+int(sales)
d=data[0]+str(sum) d=data[0]+str(sum)
print(d) \ No newline at end of file
\ 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