Python Forum
Frustrated with Assignment. S.O.S! HELP!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Frustrated with Assignment. S.O.S! HELP!
#2
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 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

Reply


Messages In This Thread
RE: Frustrated with Assignment. S.O.S! HELP! - by buran - Nov-17-2019, 07:08 AM
return in my function - by Than999 - Nov-17-2019, 08:32 PM
RE: return in my function - by perfringo - Nov-18-2019, 10:37 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020