Why does using .lower make a difference in output of the function?
pardon me if my question is unclear. This is my first attempt at a question post. While following along in this series, during the portion of coding where you are prompting the user to answer "Do you want to proceed, Y/N?", Greg uses the coding ".lower". assigned to the yes function.
While more or less copying his code on screen, I accidentally put an upper case Y instead of lower case as he did. When I went to test the code, it would not display the result "SOLD!" as expected but would instead move to the "No" prompt that states "Thank you anyway.
I caught it eventually, but don't understand why "Y" or "y", makes a difference in the code, since I assumed ".lower" forces everything to be interpreted as lower case anyway.
Thank you in advance,
Steven Parker182,307 Points
You are correct that using the "lower()" method should make the test ignore case. There could be some other issue.
Is it possible that you forgot to put the parentheses after the name "lower"?
If that's not it, show your actual code to facilitate an accurate answer.