GB21,
Thank you for using the Science Buddies fora.
I will do my best to explain using pseudo-code.
define procedure
variable number_of_words = how many words there are
for(number_of_words) { //you want to run the commands in this loop on each password in the list, so we make a for loop that runs as many times as there are passwords in the list
try password //figure out some way to check if this is the right password
if (password is right) {
display the password
stop program } else {
try capitalizing the first letter }
advance word index //you want a variable that holds your spot in line, so to speak; you need to be able to load the word at that location in memory only once, then move on to the next one
}
display failed message //if program execution reached this statement, it has finished trying all of the passwords in the list, both lowercase and capitalized, and none of them worked (otherwise, the program would have stopped); since nothing matched, you should display a message that your attempt to find the password in this bleep failed
This is essentially what you are trying to do with your code. It is up to you, as the programmer, to turn this pseudo-code into executable Python.
Hopefully, I have answered your question. If you have any other questions, feel free to ask as a reply on this thread.
Good luck,
- Ultra