Python Forum
While loop to run a boolean test
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
While loop to run a boolean test
#2
two things:
1. you never change result within the loop
2. another problem that will show up once you fix 1. is that your function isValidStudentIDFormat returns strings, so result will be str and will never become equal to True, i.e. (bool)
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
While loop to run a boolean test - by vicson - Nov-16-2018, 08:33 AM
RE: While loop to run a boolean test - by buran - Nov-16-2018, 08:49 AM
RE: While loop to run a boolean test - by vicson - Nov-16-2018, 09:39 AM
RE: While loop to run a boolean test - by buran - Nov-16-2018, 09:49 AM
RE: While loop to run a boolean test - by vicson - Nov-16-2018, 09:54 AM
RE: While loop to run a boolean test - by vicson - Nov-16-2018, 10:27 AM
RE: While loop to run a boolean test - by buran - Nov-16-2018, 10:13 AM
RE: While loop to run a boolean test - by buran - Nov-16-2018, 11:07 AM

Forum Jump:

User Panel Messages

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