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

Control Flow: Switch Forum

View Course » View Exercise

861 points
Submitted by
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.";


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 (" ").