1.Write exactly one for loop statement that prints this column of nine words:

snake
frog
snake
frog
snake
frog
snake
frog
snake

Enter your loop statement in the box below.
Question 2. 5 points

Suppose s is any String. Write a loop that prints s backwards, and with the symbol – (dash), printed twice, between pairs of characters and also at the very end:

If s is “horse”, your loop should print e–s–r–o–h–

If s is “pig”, your loop should print g–i–p–

if s is “Hi Jo!”, you’re loop should print !–o–J– –i–H–

Enter your looping code in the box below.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *