Help this newbie please! | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

Help this newbie please!

I tried to change the 9th line like if y==ā€œNoā€ or ā€œnoā€ : But it made all the following lines invalid for some reason. Could you explain what was wrong with this? https://code.sololearn.com/c736R3djX4p3/?ref=app

16th Jun 2019, 2:50 AM
CH Ahn
CH Ahn - avatar
3 Respostas
+ 4
hi, you can do several things to get this code run properly. if y == ā€˜Noā€™ or y == ā€˜noā€™ this would cover only 2 different spellings but not ā€˜NOā€™. So an other approach is recommended: if upper(y) == ā€˜NOā€™ this covers all variations of spelling.
16th Jun 2019, 5:38 AM
Lothar
Lothar - avatar
+ 1
Thank you! problem solved!
16th Jun 2019, 6:37 AM
CH Ahn
CH Ahn - avatar