1
00:00:00,760 --> 00:00:07,150
Yesterday, we made our code more intelligent by adding a match case block.

2
00:00:08,590 --> 00:00:10,430
So this is what our code does.

3
00:00:10,450 --> 00:00:16,840
Currently, we declare an empty list just here, and then we run a loop over and over again.

4
00:00:16,840 --> 00:00:17,830
So all.

5
00:00:19,080 --> 00:00:22,500
These lies will be executed over and over again.

6
00:00:22,770 --> 00:00:24,960
So we get some input from the user.

7
00:00:24,960 --> 00:00:35,520
We get add, show or exit, and then we strip that out from whitespace and then we remove the whitespace

8
00:00:35,520 --> 00:00:37,440
from the user input.

9
00:00:38,310 --> 00:00:42,240
Then the program tries to guess the user input.

10
00:00:42,240 --> 00:00:48,000
So tries to guess if it's ads, if it's ad, then it gets the to do from the user.

11
00:00:48,000 --> 00:00:55,260
Again, it asks the user for inputs and it depends that to do in a to do list which is declared in here.

12
00:00:55,560 --> 00:00:57,300
So those lines are executed.

13
00:00:57,300 --> 00:01:06,420
If the user entered ads here, if the user entered show, then we iterate over the existing to do lists.

14
00:01:06,420 --> 00:01:07,560
So that list.

15
00:01:08,840 --> 00:01:13,430
So if there are items there, those items will be printed out in the command line.

16
00:01:13,970 --> 00:01:23,180
And if the user entered exit in here, then this break statement is executed and the while loop terminates.

17
00:01:23,630 --> 00:01:31,820
So what we get is we get this line executed because there will be no more iterations anymore in the

18
00:01:31,820 --> 00:01:32,780
wild loop.

19
00:01:33,440 --> 00:01:38,660
The break statement breaks the cycle, and that's what we did yesterday.

20
00:01:39,530 --> 00:01:42,380
Let's write some more intelligent code today.

21
00:01:42,410 --> 00:01:43,370
See you in the next video.

