if while conditional statements sixth title change

1. The user logs (three chances to retry)

n = 1

while n < 4

  user = input(">>>")

  pwd = input(">>>")

  if user == "alex" and pwd == ("123")

  print ( 'Welcome' ')

  break the cycle terminates all

else

  print ( 'wrong password')

  n = n + 1

Guess you like

Origin www.cnblogs.com/yyk520/p/11111797.html