This forum is now read-only. Please use our new forums at discuss.codecademy.com.

Control Flow: Switch Forum

View Course » View Exercise

861 points
5064288f1e82215c6011ed481c6229eb?s=140&d=retro
Submitted by
pick4422
almost 2 years ago

Answer for exercise 1.4 hanging issue

After each echo statement, there should be a \ before the variable name, e.g.

echo "\$i is 0.";
echo "\$i is somewhere between 1 and 5.";

etc.

This tells the console to print the variable name "$i". Otherwise, the grader gets confused. I've tried a few different things and only this way worked for me.

Also, you may have to change all of the single quotes (' ') to double quotes (" ").