Control Statements and Conditions

The attached code shows that the quiz answer is wrong.
the output should be:
m, y, , n, a, m, e, , i, s, , x,