WEBVTT

00:00.180 --> 00:02.330
OK so you made it to the end hopefully.

00:02.400 --> 00:05.200
I mean I guess you could have skipped forward but you made it to this video.

00:05.220 --> 00:09.390
However you got here at the end of the string function section.

00:09.390 --> 00:15.450
So we have a couple of exercises and they range from pretty straightforward to reasonably complex where

00:15.450 --> 00:18.050
we combine multiple string functions together.

00:18.270 --> 00:20.100
So let's get started.

00:20.100 --> 00:25.340
The first one here is to reverse and uppercase the following sentence.

00:25.380 --> 00:30.000
Why does my cat look at me with such hatred.

00:30.030 --> 00:32.130
I would also appreciate an answer to that.

00:32.310 --> 00:38.130
If anyone can help me but anyway is what we need to do is just take this you can copy it or type it

00:38.130 --> 00:40.730
out and just use my as well.

00:40.770 --> 00:41.670
I should specify.

00:41.700 --> 00:44.120
Don't just manually reverse it and type it.

00:44.130 --> 00:44.700
Uppercase.

00:44.700 --> 00:46.680
I mean using what you just learned.

00:46.740 --> 00:54.090
How can you reverse and uppercase this right then when you're done that the next problem.

00:54.090 --> 00:54.990
This one is a little different.

00:54.990 --> 00:56.790
You don't have to actually do anything.

00:57.000 --> 01:00.220
I want you to figure out what this print out.

01:00.810 --> 01:03.740
So don't just cheat and copy and paste it.

01:03.810 --> 01:08.240
You can do that to check your work of course but try and work through what's actually happening.

01:08.400 --> 01:14.650
We've got a select I've got to replace and it can cat and some word and spaces and symbols and dashes

01:15.250 --> 01:23.190
so give it a shot then move onto the next one here which is to replace all the spaces in book titles

01:23.850 --> 01:25.160
with this little arrow.

01:25.210 --> 01:27.400
It's a dash greater than sign.

01:27.780 --> 01:29.440
So replace every space.

01:29.520 --> 01:32.990
So instead of the space namesake it's the dash.

01:33.100 --> 01:39.870
Or let's just say arrow the arrow namesake and that happens every space and one more thing I'll call

01:39.870 --> 01:41.510
attention to it just appear.

01:41.510 --> 01:43.160
It just says tidal.

01:43.320 --> 01:47.460
So you're going to need to use as to make sure it says title.

01:47.460 --> 01:51.740
So basically your task is to just get this same data printed out.

01:51.780 --> 01:53.810
This exact same format.

01:54.600 --> 01:56.340
Then after that.

01:56.340 --> 01:57.720
Print this out.

01:58.170 --> 02:06.520
So you're going to have the authors the last name printed regularly forwards and then next to it.

02:06.570 --> 02:11.610
You'll have the same author's name printed backwards in reverse.

02:11.610 --> 02:14.820
You might say so if that's what you need to do.

02:14.820 --> 02:17.610
Also pay attention appears as forwards and backwards.

02:17.700 --> 02:20.450
So you need to use as again to do that.

02:20.580 --> 02:29.040
Then once you do that the next one like to print out a full author's name so it's a little more complicated

02:29.580 --> 02:33.030
in caps so we want Jhumpa Lahiri.

02:33.030 --> 02:37.630
So that's author first name and last name combined and uppercase.

02:38.070 --> 02:42.970
And that should happen for every author and then also again the name appears.

02:43.010 --> 02:46.820
The header says full name in caps.

02:46.830 --> 02:48.960
All right then.

02:49.050 --> 02:50.200
Make this happen.

02:50.490 --> 02:59.940
So what this is showing is a title the name sake and then was released in and then the actual date that

02:59.940 --> 03:02.810
we have stored in our database for when it was released.

03:02.910 --> 03:08.530
So you need to combine title was released in and then the year it was released.

03:08.700 --> 03:13.810
And again I called it blurb but just put some label up there.

03:14.760 --> 03:17.350
Then next one here.

03:17.520 --> 03:24.360
Print book titles and the length of each title which is pretty similar to what I had what I did using

03:24.390 --> 03:30.380
author's last names so just print the title and then the number of characters in that title.

03:30.480 --> 03:32.570
As you can see some of them are quite long.

03:33.150 --> 03:35.890
The only other thing I would say is appear.

03:35.990 --> 03:36.620
Pay attention.

03:36.620 --> 03:41.420
We have character count so use as you get it right now.

03:42.180 --> 03:46.960
Then finally this one combines three different pieces of data.

03:47.170 --> 03:54.370
We'd like to have a shortened title so I believe this is 10 characters one two three four five six seven

03:54.400 --> 03:54.890
eight nine.

03:54.900 --> 03:55.290
Yes.

03:55.290 --> 04:04.650
So the first ten characters and then a dot dot dot afterwards and call that short title then we'll have

04:04.650 --> 04:05.790
the author printed out.

04:05.790 --> 04:14.060
But the way it should be printed is a last name followed by a comma followed by first name and then

04:14.330 --> 04:15.360
quantity.

04:15.560 --> 04:22.250
So quantity should not just be the number we have in stock but it should be the sentence 12 in stock

04:22.250 --> 04:24.010
or 104 in-stock.

04:24.110 --> 04:30.560
So there's a lot of pieces here and each one of these three is going to require multiple string functions

04:30.650 --> 04:31.820
to make it work.

04:32.360 --> 04:34.190
So give it a shot.

04:34.190 --> 04:35.900
This one is a little more challenging.

04:35.900 --> 04:36.910
So don't panic again.

04:37.010 --> 04:39.670
If you don't get it but try.

04:39.920 --> 04:42.050
And then in the next video solutions.
