Commit 07ac174d by BellCodeEditor

save project

parent 6c27f19c
Showing with 18 additions and 22 deletions
def s(): i=3
total = [] username="dsbdsb"
while True: userpassward="54188"
money=input("请输入(q退出):") while True:
if money== "q": if i>0:
name=input("请输入用户名")
passward=input("请输入密码")
i=i-1
if username==name and userpassward==passward:
priut("登录成功")
break break
if name != username:
print("用户名不存在,请重新输入")
continue
if passward != userpassward:
print("密码错误,请重新输入")
else: else:
try: print("你的账户已锁定,请一小时后再来")
money=int(money) print("大傻逼登录失败")
except: print("欢迎来的大傻逼世界")
print("请重新输入一个数字")
else:
total.append(money)
finally:
print("-----------------------")
return total
def sum(money):
count=0
for i in money:
count=count+i
return count
price=s()
pay=sum(price)
print("您一共消费了"+ str(pay) + "元!扫码还是现金呢?")
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