Next little problem. It says my syntax for guessMatches is invalid. How do I correctly declare a boolean variable?
#!/usr/bin/env python3 #PasswordGuesser.py AlphaNum = "abc" guess = "" bool guessMatches = false password = "b" guessLength = len(guess) guessLength = 1 #start with a guess length of just one char def iterateAlphaNum(): i = 0 while i < len(AlphaNum): guess[0] == AlphaNum[i] i += 1 #Master While Loop: while the last char of the guess string has not yet passed #the last char in AlphaNum while guess[len(guess)-1] <= AlphaNum[len(AlphaNum)-1]: guess[0] = iterateAlphaNum() print(guess) if guess == password: guessMatches = true print() print("Found the password! It's " + str(guess)) break