I\'m trying to develop a function mirror()
that takes a string and returns its mirrored string but only if the mirrored string can be represented using \"mirror
You have the right idea about iterating through the given letters in reverse order. However, you cannot necessarily just give each letter itself as its own mirrored version. An example would be b
and d
, which are mirror versions of each other.
The simplest way if you're learning to program would be to use a for
loop to move backwards through the given letters, and use some if
statements for each letter to determine the mirrored letter (if there is one).