What is wrong with this code? When the earthquake level is 7, it doesn’t print anything.
Hey there, great question, and cool code!
The issue is in your first if statement, where you’re using the less than operator
< with the string
'too high to count'. This will always return false, because you’d be comparing a number like
7 to a string of text.
Try changing it to
if (earthquakeLevel > 5 && earthquakeLevel < 11) or
<= 10. That should do the trick!
Good luck! Let me know if you have any questions.