题目
思路
没输入一次密码就判断一次
并统计输入次数
根据题目条件判断输出结果
代码
corr_password,try_num=input().split()
try_pass=input()
try_count = 1
while(try_pass!='#'):
if try_pass==corr_password:
print("Welcome in")
break
else:
print(f'Wrong password: {try_pass}')
if try_count>=int(try_num):
print("Account locked")
break
try_pass = input()
try_count = try_count + 1