0
Does it matter if the words are in upper or lower case?
if answer == "yes" elsif answer == "no" In codes like the ones above does it matter the case that I put the words in? For example, if I leave this code the way it is and the user inputs Yes istead of yes will the code still work?
2 Respuestas
+ 4
You can try this:
if answer.upcase == "YES"
elsif answer.upcase == "NO"
this way answer 'becomes' case insensitive
0
Thank You