1 00:00:00,450 --> 00:00:06,450 So now returning to our program back here, we check that weather, this string that is symbol type 2 00:00:06,960 --> 00:00:11,430 is another symbol of the environment, is another symbol of strength. 3 00:00:11,880 --> 00:00:19,920 So if the fire is kind of a symbol, stip particular variable, the execution, the blog that follows 4 00:00:19,920 --> 00:00:26,490 after this particular line of particular symbol, and if it isn't, then the execution skips to the 5 00:00:26,490 --> 00:00:29,970 instant end of the block of the end spot over here. 6 00:00:29,970 --> 00:00:36,500 That is, if this is not true, then this whole thing will be skipped and will be going to the Ellsburg. 7 00:00:37,110 --> 00:00:42,760 So the Saiful program needs to run different depending on whether the symbol is in the particular given 8 00:00:42,780 --> 00:00:43,530 symbols it. 9 00:00:43,950 --> 00:00:48,030 Now, here we are also using another method that is final. 10 00:00:48,750 --> 00:00:49,230 Now this. 11 00:00:49,230 --> 00:00:54,750 Find the index of your symbol type string where the symbol is or the SVM is. 12 00:00:55,020 --> 00:01:01,680 So over here we are seeing the index is equal to in the symbol types dot find the index of a slide. 13 00:01:02,130 --> 00:01:08,610 OK, so this basically includes a methodical method of just like functions, except they are attached 14 00:01:08,610 --> 00:01:10,470 to a value with a particular period. 15 00:01:10,890 --> 00:01:17,340 The name of this method is fine and it's been called on string store or string value stored in your 16 00:01:17,640 --> 00:01:18,510 symbol type. 17 00:01:18,640 --> 00:01:22,710 OK, so most database like strings have metal to define. 18 00:01:22,710 --> 00:01:29,550 Metal takes one argument that returns the integer index of where the argument appears in your particular 19 00:01:29,550 --> 00:01:30,300 method string. 20 00:01:30,870 --> 00:01:34,260 Now, just to find out this find in the interactive Shellback. 21 00:01:34,650 --> 00:01:37,890 We'll go back there and here we will write down something. 22 00:01:38,070 --> 00:01:42,270 See Titan not C find. 23 00:01:44,000 --> 00:01:50,400 And Brackett, we give Sivi, OK, so the index of VII's one. 24 00:01:50,780 --> 00:01:58,610 Similarly, we see see Biton dot find in Brakhage views here. 25 00:01:59,180 --> 00:02:03,500 See how the index of always is zero. 26 00:02:03,800 --> 00:02:12,770 For example, we use here standard variable that is equal to, say, Biton value and now Veals span. 27 00:02:12,950 --> 00:02:16,920 Both say fine, we give here, ok. 28 00:02:17,570 --> 00:02:19,410 That also gives us the value for. 29 00:02:19,790 --> 00:02:26,570 So now here you can see we have used fine method to either on string or either on a particular variable 30 00:02:26,570 --> 00:02:27,830 containing string value. 31 00:02:28,100 --> 00:02:31,650 So remember that indexing in Python starts always with zero. 32 00:02:31,850 --> 00:02:37,400 So when the index return, my defined method is for the first character as a string, it is zero. 33 00:02:37,820 --> 00:02:41,480 And if the string argument cannot be found, find method will return. 34 00:02:41,480 --> 00:02:42,830 An individual is minus one. 35 00:02:43,070 --> 00:02:52,130 For example, if you see, for example, in this under did not find the one which is not there in our 36 00:02:52,130 --> 00:02:52,990 particular string. 37 00:02:53,000 --> 00:02:55,430 So we get the was minus one. 38 00:02:56,270 --> 00:03:00,380 So again, here you can notice that find this also case sensitive. 39 00:03:00,680 --> 00:03:06,080 For example, if you try to do something like say, Bitan DOT. 40 00:03:07,120 --> 00:03:10,850 Fine, we give capital, we're having small people. 41 00:03:10,870 --> 00:03:14,560 We're giving the capital, be it again gives us minus one. 42 00:03:14,740 --> 00:03:20,620 So if you pass something which is in a different case again, you will get not get the value found with 43 00:03:20,620 --> 00:03:21,840 the help of find a method. 44 00:03:22,060 --> 00:03:27,820 So the individual that find that return or finds method returns will be an index of the first character 45 00:03:28,120 --> 00:03:30,070 where the argument is found. 46 00:03:30,160 --> 00:03:34,360 OK, now, again, for example, we see Biton. 47 00:03:38,890 --> 00:03:49,710 And your views you find in Brakhage, we give your all in, but it finds for the first character, that 48 00:03:49,720 --> 00:03:53,830 is all so also for itself, right? 49 00:03:54,340 --> 00:04:05,170 Similarly, suppose you use your Biton bitin dort find we give your B which is coming. 50 00:04:05,200 --> 00:04:08,530 I actually give you the first appearance. 51 00:04:08,530 --> 00:04:11,290 That is the zero, the first character. 52 00:04:11,730 --> 00:04:17,190 OK, so define string method is like a more specific version of using the inoperative. 53 00:04:17,590 --> 00:04:24,340 It not only tells you whether a string exists in another string, but also tells you whether it is there 54 00:04:24,340 --> 00:04:26,040 at a particular which position. 55 00:04:26,530 --> 00:04:29,000 So encrypting and decrypting the symbols. 56 00:04:29,020 --> 00:04:33,880 So now let's go back to over this overprogrammed and over here. 57 00:04:34,030 --> 00:04:40,830 We have understood the if part, the elusive part, the Ellsburg and also the operator and string metal. 58 00:04:41,050 --> 00:04:47,500 So it is easier for us to know how the rest of the program looks to see the Saiful can only encrypt 59 00:04:47,650 --> 00:04:51,460 the Crips and Bloods that are in the symbol said that we have given that is over here. 60 00:04:51,900 --> 00:04:57,820 OK, so before running the code, the program must figure out what the symbol is in in this symbol said 61 00:04:57,820 --> 00:04:58,840 that you have created. 62 00:04:59,320 --> 00:05:05,620 Then it can find the index where the symbol is located and the index return by define is stored in a 63 00:05:05,620 --> 00:05:06,890 particular symbol index. 64 00:05:07,270 --> 00:05:12,910 Now that we have the current symbol next door, the variable, we can do the encryption decryption of 65 00:05:12,910 --> 00:05:13,050 it. 66 00:05:13,270 --> 00:05:19,050 So the seasons for at the key number to the symbol next to encrypted or subtract the key numbers. 67 00:05:19,540 --> 00:05:26,080 Now, for example, if you see the value stored in your translated SDR or the translated variable, 68 00:05:26,680 --> 00:05:31,700 it is the index of your symbol type of the translator symbol. 69 00:05:32,170 --> 00:05:39,270 So after this, depending on your mood type, if it is encrypting, we are adding value to that index 70 00:05:39,280 --> 00:05:45,010 and if it is decrypting, we are subtracting the code value, which we have that is 13 from the symbol 71 00:05:45,010 --> 00:05:45,460 index. 72 00:05:45,670 --> 00:05:47,120 And then we are checking here. 73 00:05:47,170 --> 00:05:51,700 If it is more than the length of of a symbol, then you're subtracting the values. 74 00:05:51,940 --> 00:05:57,670 If it is less than zero, that is, if it goes in the negative, you are the value of similar things. 75 00:05:58,030 --> 00:06:04,370 And at the end you are simply printing the value of what is the translated estimate of your values. 76 00:06:04,570 --> 00:06:13,330 So if over here suppose you are giving the values that is, and we are also copied down the same text 77 00:06:13,330 --> 00:06:21,670 that is being printed using our copy matter in this way, we have seen how the particular program executes 78 00:06:21,670 --> 00:06:23,080 from the start to the end.