예제 #1
0
def main():
    currPassword = Password()
    currPassword.setPassword()

    done = True
    while done:
        print("\nCheck another password?")
        print("(1): Yes")
        print("(2): No")
        userChoice = int(input("Enter choice: "))

        if userChoice == 1:
            currPassword.setPassword()
        elif userChoice == 2:
            break
        else:
            print("Enter a valid choice.")
예제 #2
0
def main():
    again = True
    while again:
        password = Password()
        password.setPassword(
            input(
                "Enter a password (minimum of eight characters and needs two numbers): "
            ))
        if password.isValid():
            print("Valid Password.")
        else:
            print(password.getErrorMessage())

        playAgain = input("Do you want to play again?(Y/N): ").upper()
        if playAgain == "Y":
            pass
        else:
            again = False
            print("Thanks for playing!")
예제 #3
0
def main():
    # Tell the user what the password parameters are
    print("Password must be 8 characters long")
    print("Password must contain at least one letter and at least two numbers")
    print("Password cannot have any special characters")

    # Create a loop until the user enters a password that satisfies the parameters
    loop = True
    while loop:
        # ask the user for the desired password
        userPassword = input("Enter the desired password: "******"":
            loop = False
    print("Password meets parameters")
예제 #4
0
from password import Password

password1 = Password()
# get user input
password1.setPassword(input("Enter password: "))
password1.main()

예제 #5
0
from password import Password


userInput = ''
userPassword = Password()


while userInput != ":q!":
	userInput = input("Enter Password\n")

	userPassword.setPassword(userInput)
	userPassword.calculateScore()
	#userPassword.printReport()
	userPassword.printScore()