how do i correct this <code> i was trying to prin...
# getting-started
a
how do i correct this code i was trying to print "very strong" when the password is very strong but it prints both "very strong" and "strong" and "need improvement" if the password is weak it works fine
k
You have ‘length’, ‘symbol’, ’int, and ‘’string’ which are all bools. Are they meant to be mutually exclusive?
c
There is nothing preventing your code from calling
valid()
from multiple places. Instead of having
valid()
print the result, you should be storing into local variables which conditions pass, and after everything use those variables to determine what to print
a
how i do that
c
Just restrict yourself so that you only ever call
valid()
once, and work backwards from there to determine how to set the boolean properties of that single function call