淘淘购物系统 (Python) – Python量化投资

淘淘购物系统 (Python)

#首页
def tao_first():
t1 = ‘欢迎进入淘淘购物’.center(110)
print(t1)
print(‘~’ * 130)
t2 = ‘注册’.center(20)
print(t2,end=\t‘)
t3 = ‘登陆’.center(65)
print(t3,end=\t‘)
t4 = ‘退出’.center(45)
print(t4,end=\t‘)
print()
print(‘~’ * 130) #
#购物车首页
def tao_second():
second0 = ‘|| 购物车 ||’.center(125)
print(second0)
print()
print(‘=’ * 130)
print(‘商品名称’,end=\t‘)
print(‘价格’,end=\t‘)
print(‘数量’,end=\t‘)
print(\n‘)
for i in sprice:
print(i)
print(‘-‘ * 130)
print(‘提交订单’.center(20),end=\t‘)
print(‘删除订单’.center(65),end=\t‘)
print(‘添加订单’.center(45),end=\t‘)
print(\n‘)
print(‘查看订单’.center(20),end=\t‘)
print(‘继续购物’.center(65),end=\t‘)
print(‘退出系统’.center(45),end=\t‘)
print(\n‘)
print(‘=’ * 130)

#登陆
shop_name =
def login():
l0 = ‘|| 登陆 ||’.center(115)
print(l0)
i = 3
while i > 0:
username = input(‘please input the username :’)
password = input(‘please input the password : ‘)
if username in lisl[0::2] and password in lisl[1::2] :
wage.append(username)
wage.append(0)
shop_name = username
break
else:
i -= 1
print(‘验证失败,请再次尝试,您还有’+str(i)+‘次机会’)
continue
#注册
def enter():
while 1:
e0 = ‘|| 注册 ||’.center(115)
print(e0)
e1 = input(‘请输入用户名:’)
e2 = input(‘请输入密码:’)
e3 = input(‘请再次确认密码:’)
if e3 == e2 and e1 not in lisl:
print(‘恭喜你注册成功,快去登陆吧…’)
lisl.append(e1)
lisl.append(e3)
break
if e3 != e2 :
print(‘对不起你输入的密码两次不一致,请重新注册’)
continue
if e1 in lisl:
print(‘对不起你输入的账户信息已存在,请重新注册’)
continue
#工资
def staff_wage():
“””
wage = [uername : wage]
shop_name = uername
:return:
“””
while 1:
if wage[1] < money:
print(wage[0] + ‘的工资是’ + str(wage[1]) + ‘人民币,不足以支付订单…’)
print(‘|| 支付 ||’.center(115))
print(‘=’ * 130)
print(‘充值金钱’.center(20),end=\t‘)
print(‘查看余额’.center(65),end=\t‘)
print(‘放弃支付’.center(45),end=\t‘)
print(\n‘)
print(‘=’ * 130)
shop_k = input(‘请输入你要选择的功能<<<‘)
if shop_k == ‘充值金钱’:
age = input(‘请输入你要充值的金钱<<<‘)
https://www.cnblogs.com/if-it-is-possible/p/11480691.html

「点点赞赏,手留余香」

    还没有人赞赏,快来当第一个赞赏的人吧!
0 条回复 A 作者 M 管理员
    所有的伟大,都源于一个勇敢的开始!
欢迎您,新朋友,感谢参与互动!欢迎您 {{author}},您在本站有{{commentsCount}}条评论