1
00:00:01,940 --> 00:00:07,670
Yesterday you learned how to use the try and accept block in Python.

2
00:00:10,740 --> 00:00:18,450
Try and accept avoids the program from braking abruptly for the user with an error.

3
00:00:18,450 --> 00:00:22,830
So instead of showing an error to the user, which is not recommended.

4
00:00:23,760 --> 00:00:28,940
You give a new opportunity to the user to enter the correct commands.

5
00:00:28,950 --> 00:00:32,910
So in our case, if the user enters something like edit.

6
00:00:34,500 --> 00:00:38,280
Do that instead of edit one or edit three.

7
00:00:39,060 --> 00:00:43,970
So if they enter, edit, do that, which is a wrong command to enter.

8
00:00:43,980 --> 00:00:53,580
We perform these actions, so we tell the user that the command is not valid and then we continue the

9
00:00:53,580 --> 00:00:54,030
loop.

10
00:00:54,030 --> 00:00:56,670
We give the user a new opportunity.

11
00:00:56,670 --> 00:01:00,420
So we asked the user to enter the command again.

12
00:01:02,300 --> 00:01:07,490
And we check all the cases again freshly.

13
00:01:09,870 --> 00:01:16,440
It was important to specify the name of the error here value error in this case.

14
00:01:16,440 --> 00:01:18,390
So we saw that in the command line.

15
00:01:18,390 --> 00:01:19,830
We got a value error.

16
00:01:19,860 --> 00:01:22,110
Therefore, we specify that in here.

17
00:01:23,660 --> 00:01:25,850
And that was what you learned yesterday.

18
00:01:25,880 --> 00:01:29,300
Today, there's a lot of important things you need to learn.

19
00:01:29,300 --> 00:01:31,100
So I'll see you in the next video.

