1
00:00:05,450 --> 00:00:06,520
Welcome back everyone.

2
00:00:06,680 --> 00:00:09,980
So we just learn about all the data types and data structures.

3
00:00:09,980 --> 00:00:14,800
Now it's time to do a quick exercise review underneath your Paice on level 1 folder.

4
00:00:14,830 --> 00:00:16,660
You should find a 0 5.

5
00:00:16,810 --> 00:00:19,190
Exercise underscore reviewed that PI file.

6
00:00:19,290 --> 00:00:23,410
Basically a Python script that has a bunch of common problems free to solve.

7
00:00:23,410 --> 00:00:26,950
So just five quick problems for understanding it should be pretty straightforward.

8
00:00:27,100 --> 00:00:31,540
We're now going to jump over to the Adam text editor and walk you through what these problems are expected

9
00:00:31,540 --> 00:00:32,090
to do.

10
00:00:32,290 --> 00:00:33,590
OK let's head over there now.

11
00:00:33,610 --> 00:00:33,850
OK.

12
00:00:33,850 --> 00:00:38,200
So this is what the file actually looks like basically just a bunch of comments and then you're given

13
00:00:38,200 --> 00:00:40,270
a problem statement so there's five problems here.

14
00:00:40,270 --> 00:00:45,940
So problem one says given this string aesthetical to a flask use indexing to print out the following

15
00:00:46,060 --> 00:00:50,230
f s s k and Ls and k.

16
00:00:50,260 --> 00:00:55,060
So for example for the first one it should just be something really simple like you're grabbing F which

17
00:00:55,060 --> 00:00:59,000
should be the first letter in S which say s indexed at zero.

18
00:00:59,020 --> 00:01:01,030
So that would be the answer for this first one.

19
00:01:01,180 --> 00:01:06,530
So then you need to do it for these other letters and then bonus use indexing to reverse the string.

20
00:01:06,610 --> 00:01:08,190
So we might have mentioned that during the lectures.

21
00:01:08,200 --> 00:01:09,460
See if you can figure it out.

22
00:01:09,490 --> 00:01:12,550
Again that's a bonus problem not a huge issue if you can't figure it out.

23
00:01:13,320 --> 00:01:18,330
Problem 2 is given this nested list and Lotusphere there's a list inside of another list assigned to

24
00:01:18,420 --> 00:01:19,010
L..

25
00:01:19,080 --> 00:01:21,180
Or we could call this you know my list.

26
00:01:21,180 --> 00:01:25,800
We want you to reassign hello this string hello to be goodbye.

27
00:01:25,920 --> 00:01:27,600
How would you actually use that.

28
00:01:27,720 --> 00:01:31,770
You should use two sets of indexing off of that object.

29
00:01:31,800 --> 00:01:37,110
Problem 3 is using keys and indexing grab Hello from the following dictionaries.

30
00:01:37,140 --> 00:01:38,190
So this one's really easy.

31
00:01:38,190 --> 00:01:39,180
Just a simple key.

32
00:01:39,180 --> 00:01:40,210
And then you have hello.

33
00:01:40,470 --> 00:01:43,650
And then the next one notice you'll have a nested dictionary here.

34
00:01:43,650 --> 00:01:48,330
So it's going to take two key calls and then here you have a list and dictionary.

35
00:01:48,330 --> 00:01:50,430
So this was probably really tricky.

36
00:01:50,430 --> 00:01:51,200
Keep that in mind.

37
00:01:51,240 --> 00:01:54,030
This one's going to be one you want to break down piece by piece.

38
00:01:54,030 --> 00:01:57,840
So first try K-1 see what you get back and keep building off of that.

39
00:01:57,840 --> 00:01:59,430
Again this one's really tricky.

40
00:02:00,420 --> 00:02:05,290
Problem for is using a set find the unique values inside the list.

41
00:02:05,400 --> 00:02:09,960
We should a really similar example to this in the lecture so maybe review the lecture if you forgot

42
00:02:09,960 --> 00:02:11,960
how to do that problem.

43
00:02:12,000 --> 00:02:17,730
5 If you're given these two variables age sequel to four and name the Sami I want you to use print formatting

44
00:02:17,790 --> 00:02:23,550
either the dot format method or the string literal method to pronounce the name hello or print out the

45
00:02:23,550 --> 00:02:24,150
sentence.

46
00:02:24,150 --> 00:02:26,580
Hello my dog's name is Sammy and he is four years old.

47
00:02:26,610 --> 00:02:28,140
Again you've given two variables here.

48
00:02:28,140 --> 00:02:32,730
Use print formatting like we discussed in the streams lecture to actually print out a string that looks

49
00:02:32,730 --> 00:02:33,640
like this.

50
00:02:33,690 --> 00:02:34,290
OK.

51
00:02:34,440 --> 00:02:35,940
Best of luck in the next lecture.

52
00:02:35,940 --> 00:02:37,000
We'll go over the solutions.
