Fishc_密码验证程序

来源:互联网 发布:网络不文明现象 编辑:程序博客网 时间:2024/05/13 10:40
设计密码验证程序,三次机会,如果包含*号的话不计算在内。
count =3password = 'OstrovskyWzp'while count:    temp = input("please input password:")    if password == temp:        print("right")        break;    elif '*' in temp:        print("not * in password,you have ",count,"times!",end = ' ')        continue;    else:        print("wrong password!you have",count-1,"times!",end= ' ')    count-=1

原创粉丝点击