Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+34 votes

Is there anything wrong with the piece of Hannaldous code where it sees if the character is not a uppercase or lowercase letter? Or any other common issues with that method because I thought I had it fixed but it isn't noticing certain symbols.

asked in CSC285_Fall2018 by (1 point)

3 Answers

+19 votes

The code should function (or at least how I think it was intended to function) is that if the code contains any non-alphabetical character, it should fail the test and not be considered a good password.

answered by (1 point)
+18 votes

I talked with Dr. Stonedahl about this earlier and he told me that the method is checking if the character is contained within 'a' and 'z' as well as 'A' and 'Z' on the ascii table of characters. the method is designed to check if the character is any symbol not within those intervals on the ascii table.

answered by (1 point)
+18 votes

There is no problem with the logic of this Code. The second method just check there are full of letters or not. Even if you feel that is some problems, you can't change the logic of code, you only can make it easier to read.

answered by (1 point)
+6

Yes -- this is important! You aren't trying to fix Hannaldous code. You are trying to refactor it. There is a difference!

...