OK so you made it to the end hopefully.
I mean I guess you could have skipped forward but you made it to this video.
However you got here at the end of the string function section.
So we have a couple of exercises and they range from pretty straightforward to reasonably complex where
we combine multiple string functions together.
So let's get started.
The first one here is to reverse and uppercase the following sentence.
Why does my cat look at me with such hatred.
I would also appreciate an answer to that.
If anyone can help me but anyway is what we need to do is just take this you can copy it or type it
out and just use my as well.
I should specify.
Don't just manually reverse it and type it.
Uppercase.
I mean using what you just learned.
How can you reverse and uppercase this right then when you're done that the next problem.
This one is a little different.
You don't have to actually do anything.
I want you to figure out what this print out.
So don't just cheat and copy and paste it.
You can do that to check your work of course but try and work through what's actually happening.
We've got a select I've got to replace and it can cat and some word and spaces and symbols and dashes
so give it a shot then move onto the next one here which is to replace all the spaces in book titles
with this little arrow.
It's a dash greater than sign.
So replace every space.
So instead of the space namesake it's the dash.
Or let's just say arrow the arrow namesake and that happens every space and one more thing I'll call
attention to it just appear.
It just says tidal.
So you're going to need to use as to make sure it says title.
So basically your task is to just get this same data printed out.
This exact same format.
Then after that.
Print this out.
So you're going to have the authors the last name printed regularly forwards and then next to it.
You'll have the same author's name printed backwards in reverse.
You might say so if that's what you need to do.
Also pay attention appears as forwards and backwards.
So you need to use as again to do that.
Then once you do that the next one like to print out a full author's name so it's a little more complicated
in caps so we want Jhumpa Lahiri.
So that's author first name and last name combined and uppercase.
And that should happen for every author and then also again the name appears.
The header says full name in caps.
All right then.
Make this happen.
So what this is showing is a title the name sake and then was released in and then the actual date that
we have stored in our database for when it was released.
So you need to combine title was released in and then the year it was released.
And again I called it blurb but just put some label up there.
Then next one here.
Print book titles and the length of each title which is pretty similar to what I had what I did using
author's last names so just print the title and then the number of characters in that title.
As you can see some of them are quite long.
The only other thing I would say is appear.
Pay attention.
We have character count so use as you get it right now.
Then finally this one combines three different pieces of data.
We'd like to have a shortened title so I believe this is 10 characters one two three four five six seven
eight nine.
Yes.
So the first ten characters and then a dot dot dot afterwards and call that short title then we'll have
the author printed out.
But the way it should be printed is a last name followed by a comma followed by first name and then
quantity.
So quantity should not just be the number we have in stock but it should be the sentence 12 in stock
or 104 in-stock.
So there's a lot of pieces here and each one of these three is going to require multiple string functions
to make it work.
So give it a shot.
This one is a little more challenging.
So don't panic again.
If you don't get it but try.
And then in the next video solutions.