示例#1
0
def student_register():
    while True:
        name = input("please input your name").strip()
        password = input("please input you password").strip()
        conf_password = input("please input you password again").strip()
        if password == conf_password:
            flg, msg = student_interface.student_register_interface(name, password)
            if flg:
                print(msg)
                break
            else:
                print(msg)
        else:
            print("password are not same")
示例#2
0
def register():
    while True:
        input_username = input('请输入用户名:').strip()
        input_password = input('请输入密码:').strip()
        input_re_password = input('请确认密码:').strip()
        if input_password == input_re_password:
            flag, msg = student_interface.student_register_interface(input_username, input_password)
            if flag:
                print(msg)
                break
            else:
                print(msg)
        else:
            print('两次密码不一致重新来')
示例#3
0
def register():
    print('注册学生')
    while True:
        name = input('请输入姓名:').strip()
        password = input('请输入密码').strip()
        conf_password = input('请确认密码').strip()
        if password == conf_password:
            flag, msg = student_interface.student_register_interface(
                name, password)
            if flag:
                print(msg)
                break
            else:
                print(msg)
        else:
            print('俩次密码不一致,请重新输入')
示例#4
0
def register():
    while True:
        username = input('请输入用户名:').strip()
        password = input('请输入密码:').strip()
        re_password = input('请重复密码:').strip()

        if re_password == password:
            flag, msg = student_interface.student_register_interface(
                username, password)
            if flag:
                print(msg)
                break
            else:
                print(msg)
        else:
            print('两次输入的密码不一致,请重新输入')
示例#5
0
def  register():
    while True:
        username=input("请输入用户名").strip()
        password=input("请输入密码").strip()
        re_password=input("请确认密码").strip()
        if password == re_password :
            flag,mag=  student_interface.student_register_interface(
                    username,password
                )
            if  flag :
                print(mag)
                break

            else:
                print (mag)

        else:
            print ("密码不一致请重新输入")
示例#6
0
def register():
    while True:
        user_name = input('请输入用户名:').strip()
        password = input('请输入密码:').strip()
        re_password = input('请再次输入密码:').strip()

        # 判断两次密码是否一致
        if not password == re_password:
            print('两次密码输入不一致,请重新输入')
            continue

        # 调用逻辑接口层,处理注册
        flag, msg = student_interface.student_register_interface(
            user_name, password)

        print(msg)
        if flag:
            break
示例#7
0
def register():
    while True:
        username = input('请输入用户名==>').strip()
        password = input('请输入密码==>').strip()
        re_password = input('请再次输入密码==>').strip()

        if username == '' or password == '' or re_password == '':
            print('用户名和密码不能为空!')
            continue
        if password == re_password:
            flag,msg = student_interface.student_register_interface(username,password)
            if flag:
                print(msg)
                break
            else:
                print(msg)
        else:
            print('两次输入密码不一致,请重新输入!')
示例#8
0
def register():
    while True:
        stu_name = input('请输入账户名:').strip()
        stu_pwd = input('请输入密码:').strip()
        re_pwd = input('请确认密码').strip()

        if not stu_pwd == re_pwd:
            print('密码不一致请重新注册')
            continue

        flag, msg = student_interface.student_register_interface(
            stu_username=stu_name, stu_password=stu_pwd)

        if flag:
            print(msg)
            break
        else:
            print(msg)
            break
示例#9
0
def register():
    while True:
        username = input('请输入用户名:').strip()
        password = input('请输入密码:').strip()
        re_password = input('请输入确认密码:').strip()

        # 小的逻辑判断
        if password == re_password:
            # 调用接口层,学生注册接口
            flag, msg = student_interface.student_register_interface(
                username, password)

            if flag:
                print(msg)
                break
            else:
                print(msg)
        else:
            print('两次密码不一致,请重新输入')
示例#10
0
def student_register():
    """
    注册
    :return:
    """
    while True:
        name = input("请输入名字:").strip()
        password = input("请输入密码").strip()
        conf_password = input("请确认密码:").strip()
        if password == conf_password:
            flg, msg = student_interface.student_register_interface(
                name, password)
            if flg:
                print(msg)
                break
            else:
                print(msg)
        else:
            print("两次密码不一致")
示例#11
0
def student_register():
    print('学生注册'.center(40, '-'))
    if student_info['name']:
        print('您已登陆,无法注册!')
        return
    while True:
        name = input('请输入姓名:').strip()
        password = input('请输入密码:').strip()
        passwordre = input('请确认密码:').strip()
        if not name or not password or not passwordre:
            continue
        if password == passwordre:
            state, msg = student_interface.student_register_interface(
                name, password)
            if state:
                print(msg)
                break
            else:
                print(msg)
                break
        else:
            print('两次密码不一致!')
示例#12
0
def student_register():
    """
	注册
	:return:
	"""
    if student_name['name']:
        print('你已经登陆了')
        return
    while True:
        name = input("请输入账号或者输入q退出:").strip()
        if not name: continue

        if name == 'q': break
        password = input('请输入密码:').strip()
        password1 = input('请确认密码:').strip()
        if password == password1:
            flag, msg = student_interface.student_register_interface(
                name, password)
            if flag:
                print(msg)
                break
            else:
                print(msg)