Setting a Password
https://repl.it/@nicklee11/VioletHarmfulCoolingfan
Not sure what to do on line 5 and 6...any suggestions?
moudy (112)
@nicklee11 not sure if you saw the update but you can now accept comments as having answered your question. See the announcement for more info.
Is there something we could change to make this feature more noticeable?
You can check the length of a string by doing
len(string)
, and you can compare lengths by doingint1 > int2
in your case, this would bewhile len(password) < 8 or len(password) > 15:
Please upvote my comment if it was helpful or useful. Thanks!
@mat1 Thanks that worked! But would you know why my error messages wouldn't pop up? on line 12, also if I did enter correct, "password has been set" isn't popping up. Any idea what I did wrong?
@nicklee11 You can check if two variables are equal with
==
, for example;if password == password_confirm:
. Also, in line 13,found
is set toFalse
which causes the next if statement to fail and not print anything.Please upvote my comment and mark it as the answer if it was helpful or useful, thanks!