9.3. Mirroring Text

What happens if we add the letter to both sides of the new string that we’re making?

Try changing the phrase and see what effects you can generate.

The accumulator doesn’t have to be set to be an empty string. You can put something in the accumulator, and then it will show up in the middle of the mirrored phrase.

Activity: CodeLens 9.3.3 (Char_In_Middle)

<p>The phrase <code>”A but tuba”</code> is a <b>palindrome</b>. The letters are the same forward and backward. The below program generates the output: <code>”abut tub a<=>a but tuba”</code> Put the lines in the right order with the right indentation.</p>

Note

Discuss topics in this section with classmates.

Show Comments
You have attempted of activities on this page