# -*- coding: utf-8 -*-raw_input('username: ')n = raw_input('passward: ')x = 0if n == '123': print '登录成功'else: print '登录失败'while n != '123' and x < 3: n = raw_input('try again: ') x = x + 1 if x == 3: print '失败'else: pass
登录程序(可重试三次)
本文共 307 字,大约阅读时间需要 1 分钟。
# -*- coding: utf-8 -*-raw_input('username: ')n = raw_input('passward: ')x = 0if n == '123': print '登录成功'else: print '登录失败'while n != '123' and x < 3: n = raw_input('try again: ') x = x + 1 if x == 3: print '失败'else: pass
登录程序(可重试三次)
转载于:https://www.cnblogs.com/dashui123/p/8986114.html