- [Instructor] In this Self Check exercise,
we'd like you to display the word Amanda
on three separate lines,
one in which Amanda's right aligned,
one in which it's center aligned,
and one in which it's left aligned,
each in a field of 10 characters.
And just so that you can clearly see the alignment,
wrap the formatted data in square brackets in your output.
So go ahead and pause the video to try that,
and then come back to see the answer.
Okay, let's go ahead and reveal it.
In my case I used a single print statement to do this,
and I've got some new line characters in here
to separate the outputs.
You notice we've wrapped each of these in square brackets
so that we can see the formatted data.
So we're going to display the string Amanda,
right aligned in a field of 10,
the string Amanda, centered in a field of 10,
and the string Amanda, left aligned in a field of 10.
So let's go ahead and execute that,
and indeed you can see the alignment
inside the square brackets.