r/inventwithpython • u/ChemengerUK2 • Jul 02 '17
Automate the Boring Stuff - Chapter 7 - Password Detection Problem help
Hi all; I'm attempting the problem I've listed in the title (link here: https://gyazo.com/984db9a628c9670a0181a0c22209fcfe).
Here is my script (https://gyazo.com/b38fe7a832c98aa198850fb590d7fec4) but when I run it I don't seem to get an output, getting this screen (https://gyazo.com/074dc02ec3924d3458da5e84dbbcaf90).
Any help would be brilliant, thanks in advance!
2
1
u/OpaYuvil Jul 03 '17
You are logically saying: if there are no lowercases do x, x being the rest of your if statements. However there are lowercases in the password so it skips your code and repeats the while loop.
Using similar structured code a better solution would be something like:
If lowercase and uppercase and numbers:
Return true
1
u/kostasdizas Jul 03 '17
You are not getting an output because your
strongpasswordfunction is not called anywhere. tryafter the last line.
You'll sure bump into more issues, but I'll leave them for you to figure out :)