|
Hello: I responded to the subject quiz using the following: However, when I submit, it keeps giving me an error message stating that it didn't work on the string "Dave". However, it does work on "Dave" and numerous other strings (names) that I tested. I would appreciate if someone could tell me what is wrong with the above. I saw the answer in the video that follows the quiz, and I understand that there are other (better) ways to do it, but what is wrong with this way? Thanks Hassan |
|
You are checking if the first letter is a 'd' instead of a Capital 'D'... I guess that is your problem...
and they have different values, try to look for a ASCII Table which has the values of the characters for a computer and you'll see that they are in fact different. What you could do as alternative is something like:
|
|
Python is case sensative. If you wanted to (as I did) you could take both upper and lower case into account in your solution |
|
Thanks everyone. It just hit me, and that was it. Thanks again. |