Welcome to the CSC Q&A, where you can get help (and share your knowledge) about computer science!

Should a strong password need to be both greater than the length and have a symbol?

+14 votes
In the Hannaldous code, there is a conditional check for whether a password is strong or not based on its length and whether or not it has a symbol. It starts out being an "or", but should it be an "and"? That would make more sense as a measure of password strength.
asked Oct 3, 2016 in CSC 285 (F16) by Blake Erquiaga (100 points)

1 Answer

+4 votes
Best answer
Even though it would make more sense I think we're only supposed to refactor the code which means the external behaviour needs to stay
answered Oct 3, 2016 by Jared Haeme (285 points)
selected Oct 5, 2016 by Forrest Stonedahl
Correct, this part of the lab is an exercise in REFACTORING, so you shouldn't change what the code accomplishes (from an external viewpoint) in any way -- you should just make the code much better/more elegant, while leaving it's functionality the same.