Nov-17-2019, 07:08 AM
your function never goes after you check for rule 1. It returns on either line 5 or line 7
if it did - you would see other errors in the code
Although it's OK to short-circuit and return immediately after a rule fails. If it doesn't fail you want to continue and return True after all rules pass.
You can perform all tests in your function or as an alternative and for easier development/tests you may define separate function for each rule. Then you can use these functions in your verify() function
if it did - you would see other errors in the code
Although it's OK to short-circuit and return immediately after a rule fails. If it doesn't fail you want to continue and return True after all rules pass.
You can perform all tests in your function or as an alternative and for easier development/tests you may define separate function for each rule. Then you can use these functions in your verify() function
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs