Determining why other people voted to close a post is not reliable, but, I would have also voted to close the post because it is clear that there is a lack of testing, or validation of the code. The issues are so "basic" that it's almost as if they have not run their code at all.
For example, the test:
elif y.upper() == True
will never resolve the way you expect... it converts the
y string to uppercase, instead of what I expect the user wants, which is
Additionally, the description clearly says: "Passwords must consist of: lowercase letters, uppercase letters, numbers" but there is no check to ensure that each of those character types is used.... the only tests are to ensure that the password is not only one character type (assuming the
upper() bug is fixed.
In other words, even the "normal" code paths that are expected to work, don't work. While it may be true that the asker does not know their code is broken ("To the best of their knowledge, does the code work"), I believe even the smallest test case that they should have run just to develop their code, would have shown the problems. A password
abc123 should fail, but does not (missing an upper-case letter), and the password
ABCDEF should fail, but does not.
So, the real question you ask is whether there is a formal, or even an implied "minimal professional standard", and I believe the answer is yes, there's an implied standard, where the "happy case" is expected to work. This is not a case of broken "edge case", but this is a case of basic expectations not being met in the code.
To suggest there is no minimum standard is to suggest that we allow unreasonable ignorance to pass for lack of knowledge, for example, can you post code that does not compile, just because you never tried to compile it? I.e. missing knowledge due to unreasonable ignorance is not "to the best of my knowledge", but it is "to the not-so-best of my knowledge".