9.2. Reversing Text

Run this next one, and look at how a simple change to the pattern gives a very different result. Here we’ll combine before rather than afterward, changing only Step 4 (how values are accumulated).

Write the code to make a palindrome with the string “popsicle”. Palindromes read the same foward and backwards. Example: appleelppa

Show Comments


Discuss topics in this section with classmates.

Show Comments
You have attempted of activities on this page