针对这个自己的方案如下:
usr_name = str(input("please input your nsme:")) usr_passwd= int(input("plesde input your password:")) i = 1 while i <= 3: if usr_name =="cc" and usr_passwd == "123": print("login succssful!") elif usr_name != "cc" and usr_passwd != "123": print('your info is wrong!') break i+=1 else: print("please go away!")
自己到底错在哪里了,需要继续反思,自己的不足在哪。多去学学,看看别人的想法,给自己点想法。