标签:用户 div == lse inpu code 三次 break 登录
使用input
#用户登录(三次机会重试) count = 3 s_account = ‘1354306368‘ s_code = ‘19990915‘ while count > 0: account = input(‘请输入账户名‘) code = input(‘请输入密码‘) if account == s_account and code == s_code: print("登陆成功") break else: print(‘用户名或密码错误‘) count-=1 print(‘还有‘,count,‘次机会重试‘) if count == 0: print(‘重试次数已用完‘)
标签:用户 div == lse inpu code 三次 break 登录
原文地址:https://www.cnblogs.com/zjkbk/p/11441702.html