Users log in three opportunities (user login three times)

! # / the User / bin / Python 
# - * - Coding: UTF-8 - * -
COUNT = 0
the while COUNT <3:
the User = the INPUT ( "Please enter your user name:")
pwd = the INPUT ( "Please enter your password:" )
IF the user == "ZD" and pwd == str (123):
Print ( "Login successful")
BREAK
the else:
Print ( "user name or password error")
COUNT = COUNT + 1

Guess you like

Origin www.cnblogs.com/zhang-da/p/10932535.html