def login(): """登陆""" count = 0 tag = True while tag: if count == 3: print("尝试次数过多,退出。") break inp_name = input("请输入用户名:").strip() inp_pwd = input("请输入密码:").strip() with open('user.txt', 'r+', encoding='utf-8') as uspwd: for i in uspwd: user = i.strip().split("|") uname = user[0] pwd = user[1] ed = user[2] if inp_name == 'q': break if inp_name == uname and inp_pwd == pwd: print(f"登陆成功你的额度为: {ed}") tag = False break else: print("登陆失败") count += 1 def tx(): """提现""" tag = True while tag: user = input("输入账号:").strip() qk = input("提现金额:").split() if user == 'q' or qk == 'q': break with open('user.txt', 'r+', encoding='utf-8') as tx0, \ open('.user.txt', 'wt', encoding='utf-8') as tx1: for i in tx0: us = i.strip().split("|") uname = us[0] ye = us[2] if user == uname: print("开始提现") tag = False break else: print(f"用户不存在") def zz(): """转账""" age = True while age: df_zh = input("请输入对方账户:").strip() bd_zh = input("请输入转账账户:").strip() if df_zh == 'q' or bd_zh == 'q': break with open('user.txt', 'r+', encoding='utf-8') as zz0, \ open('.user.txt', 'wt', encoding='utf-8') as zz1: for i in zz0: user = i.strip().split("|") uname = user[0] if df_zh == uname: print(f"{df_zh}:账户存在") elif bd_zh == uname: zz_je = input("请输入转账金额:").strip() print(f"本次转账金额{zz_je}") age = False break else: print(f"{bd_zh}:用户不存在重新输入") continue def hk(): """还款""" tag = True while tag: use = input("请输入你的账户:").strip() hkj = input("还款金额:").strip() if use == 'q' or hkj == 'q': break with open('user.txt', 'r+', encoding='utf-8') as hk0, \ open('.user.txt', 'wt', encoding='utf-8') as hk1: for i in hk0: user = i.strip().split("|") uname = user[0] ed = user[2] if use == uname: print(f"还需还款{ed}") tag = False break def start(): caoz = ['login.登陆', '0.提现', '1.转账', '2.还款', 'q.退出'] while True: inp_caoz = input(f"选择操作{caoz}\n\t: ").strip() if inp_caoz == '0': tx() elif inp_caoz == 'login': login() elif inp_caoz == '1': zz() elif inp_caoz == '2': hk() elif inp_caoz == 'q': break else: print("输入有误重新输入") start()
最新评论
# 这只是一个创建远程登录并授权的语句、仅作为记录 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'Fit2cloud!' WITH GRANT OPTION;
当MGR集群初始化结束后,需要开启MGR集群自启动(需要有一台节点是自动开启引导) loose-group_replication_start_on_boot = ON #设置节点是否在启动时自动启动 MGR 集群 loose-group_replication_bootstrap_group = ON #设置节点是否作为初始引导节点启动集群
密码:blog.sirliu.com
本内容密码:blog.sirliu.com 最新整理的文章在这里喔:https://blog.sirliu.com/2018/11/shell_lian_xi_ti.html