“英雄联盟注册页面”来咯~~

 

 

源代码:

while True:    
    print("\t\t\t英雄商城登录界面\n")
    print("~*"*38)
    print("\t\t\t1.用户登录\n")
    print("\t\t\t2.用户注册\n")
    print("\t\t\t3.退出系统\n")
    print("~*"*38)
    choice = int(input("请输入你的选择:"))
    
    while choice  == 1:
        username = input("请输入您的用户名称:")
        password = input("请输入您的用户密码:")
        if username == "kio" and password == "121212":
            print("用户名登录成功!!!")
            break
        print("""
                          自定义商城首页
                              
                           1、进入商城

                           2、休闲小游戏

                           3、退出页面
                 """)  
        select = int(input("请输入你的选择:"))

        if choice == 1:
            print("新款皮肤折扣3折,需支付28元人民币")
            purchase = int(input("请输入购买数量:"))
            money = 28 * purchase
            print("你购买的皮肤,所需金额为%s"%(money))
            money1 = int(input("请支付购买商品所需金额:"))
            if money1 == money:
                print("购买成功!")
            break
      
        if  choice == 2:
            print("各种各样的小游戏...")
            break       
            
        if  choice == 3:
            print("退出页面!")
        break

    while choice == 2:
        phone = input("请输入您要注册的手机号码:")
        if len(phone) != 11:
            print("该手机号已注册或您输入的手机号有误,请重新输入!")
            break
        elif len(phone) == 11:
            print("继续下一步!")
        message = input("请输入短信验证码:")
        if len(message) != 6:
            print("输入的短信验证码有误,请你重新验证!")
            break
        password01 = input("请输入密码:")
        password02 = input("请再次输入密码:")
        if password01 == password02 and len(password01)  >= 6 :
            print("注册成功,请重新登录。")
        break

    while choice == 3:
        break
    print("退出成功!")

 实现结果:

 

  期待下一次的再见~

   和你们一起学习的小夏~

 

 

 

  • 3
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小夏正在码...

你的鼓励是我最大的支持!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值