1
00:00:00,270 --> 00:00:07,950
Yesterday, we improved our program by adding a new feature, the added feature to implement the added

2
00:00:07,950 --> 00:00:10,470
feature, which allows the user to edit an existing.

3
00:00:10,500 --> 00:00:11,160
To do.

4
00:00:11,190 --> 00:00:21,480
We added a case edit statement so the user may add show or edit to dos and if they press edit we ask

5
00:00:21,480 --> 00:00:25,470
the user to enter the number of the to do to add it.

6
00:00:26,850 --> 00:00:36,000
And we convert that to the into an integer because the input function returns a string data type always.

7
00:00:36,000 --> 00:00:40,920
So even if it's a number, that number comes as a string type.

8
00:00:43,000 --> 00:00:51,220
So you need to convert it into a type which behaves like a number so you can make math operations to

9
00:00:51,220 --> 00:00:56,380
that number, you can order it, you can add other numbers to that and so on.

10
00:00:57,740 --> 00:01:05,330
So the types are important in programming, and then here we subtract one from that number.

11
00:01:05,330 --> 00:01:13,790
So if the user entered five, for example, we want to convert it into four because list indexing starts

12
00:01:13,790 --> 00:01:15,110
from zero.

13
00:01:15,320 --> 00:01:23,000
So once we get the index, then we ask the user to enter the new to do and we add that new to due to

14
00:01:23,000 --> 00:01:24,860
that position in the list.

15
00:01:25,730 --> 00:01:28,610
So that gives us the existing to do with that.

16
00:01:29,300 --> 00:01:32,840
Index and that will replace the existing to do.

17
00:01:34,190 --> 00:01:38,810
So we end up with an updated list which contains the new To-Do.

18
00:01:40,070 --> 00:01:41,990
And that's what we did here yesterday.

19
00:01:42,080 --> 00:01:49,790
Let's see what we can do today to improve our program even further while you learn new core Python concepts.

20
00:01:49,790 --> 00:01:51,470
So I'll talk to you the next videos.

