1 00:00:00,390 --> 00:00:07,530 Then we start for Lupul, that outrage over the message and the outrage over the characters in the message 2 00:00:07,710 --> 00:00:13,920 and inside this loop, the privileges, the column and delivery of this sort concatenated symbol to 3 00:00:13,920 --> 00:00:17,330 the correct string and the plain text SDR list. 4 00:00:17,910 --> 00:00:25,280 Now, at the end here we are concatenating here in default, plain text as dire at the next column plus 5 00:00:25,290 --> 00:00:26,520 is equal to you. 6 00:00:27,000 --> 00:00:32,790 Like basically concat is a symbol to the string at the index column in the plain text list, because 7 00:00:32,790 --> 00:00:40,200 the each string in the plain text represents a column and then at the next line we add one to the column 8 00:00:40,200 --> 00:00:40,470 there. 9 00:00:40,870 --> 00:00:46,680 So we are basically incrementing, incrementing the value of column so that the next iteration of the 10 00:00:46,680 --> 00:00:51,630 loop symbol will be concatenated to the next string in the plaintext list. 11 00:00:51,870 --> 00:00:57,630 Now we have Handal incrementing column, but we will also need to reset the variables to zero in some 12 00:00:57,630 --> 00:00:58,130 cases. 13 00:00:58,530 --> 00:01:04,050 Now, to understand the code that does that, we will need to understand a boolean operator's first. 14 00:01:04,470 --> 00:01:10,140 Now, coming into the Boolean Operators', we basically compares the boolean values and evaluate to 15 00:01:10,140 --> 00:01:17,670 a boolean value the boolean operator's that is and and all can help you from more complicated conditions 16 00:01:17,910 --> 00:01:26,150 for if and why the statements and the operator connects to explanations and evaluates to true if both 17 00:01:26,170 --> 00:01:34,770 expressions evaluates to the operator, connects to expressions and evaluates to true if one or both 18 00:01:34,770 --> 00:01:35,580 are true. 19 00:01:35,760 --> 00:01:42,300 Otherwise, these expressions evaluate false understandings in a more meaningful format. 20 00:01:42,600 --> 00:01:49,640 Let's go back here and we receive 10 more than five and do less than four. 21 00:01:50,040 --> 00:01:51,630 This will give you the value too. 22 00:01:52,020 --> 00:02:03,780 But if you certain more than five and four not equal to four will give you false because your one expression 23 00:02:03,780 --> 00:02:04,260 is true. 24 00:02:04,450 --> 00:02:05,510 Second is false. 25 00:02:05,730 --> 00:02:08,990 In this case, both the given expressions are true. 26 00:02:11,180 --> 00:02:16,880 Now, if you ever forgot how the balloon operator looks, you can just have a look at it through people, 27 00:02:17,270 --> 00:02:22,730 for example, which will give you a different combinations of the boolean value evaluated to based on 28 00:02:22,730 --> 00:02:24,080 the operator's which are used. 29 00:02:24,290 --> 00:02:35,630 For example, if we say through and through, we'll give you proof if we see true and false will give 30 00:02:35,630 --> 00:02:36,200 you a false. 31 00:02:36,860 --> 00:02:38,480 If we say Faustus false. 32 00:02:39,080 --> 00:02:41,000 Second is still false. 33 00:02:41,600 --> 00:02:45,800 If we say Waterfall's still, it is false. 34 00:02:46,310 --> 00:02:51,340 So in an operator, only when both are true, it will evaluate true. 35 00:02:52,130 --> 00:02:54,980 Similarly, let us see how the operator interacts. 36 00:02:55,550 --> 00:03:01,190 If we say 10 is more than five and we use or four, not equal to four. 37 00:03:01,400 --> 00:03:03,640 Now in this case, one is true, one is false. 38 00:03:03,650 --> 00:03:05,840 The expression will give you two. 39 00:03:06,200 --> 00:03:12,140 If we say ten is less than five or four is not equal to four. 40 00:03:12,380 --> 00:03:14,790 Now, in this case, both are false. 41 00:03:15,110 --> 00:03:18,100 So the value will come to force again here. 42 00:03:18,110 --> 00:03:25,670 If you want to know the truth, table four or if you see, for example, true or true, we'll give you 43 00:03:25,670 --> 00:03:27,520 two if it goes true. 44 00:03:27,530 --> 00:03:29,330 First one second one. 45 00:03:29,330 --> 00:03:30,210 False bill. 46 00:03:30,290 --> 00:03:33,920 It is true if you say false or. 47 00:03:34,980 --> 00:03:42,270 To first one is false, again, the straw still it will be true only when both the expression evaluates 48 00:03:42,270 --> 00:03:45,500 to false this order comes to force. 49 00:03:46,110 --> 00:03:48,280 Other than that, everything would be true. 50 00:03:48,690 --> 00:03:57,890 Similarly, if you want to say, for example, say not ten more than five is false or we say not in 51 00:03:58,260 --> 00:03:59,320 less than five. 52 00:03:59,700 --> 00:04:00,480 This is true. 53 00:04:00,930 --> 00:04:04,140 If we say not false is true. 54 00:04:04,500 --> 00:04:10,830 If we say not not false, this is also false. 55 00:04:11,250 --> 00:04:18,850 If we say not not not not false, this will come true. 56 00:04:19,860 --> 00:04:24,360 You can use multiple operators and not operate operator truth table. 57 00:04:24,360 --> 00:04:25,470 If you want to look at it. 58 00:04:25,740 --> 00:04:28,260 If it is not true, will be false. 59 00:04:28,630 --> 00:04:31,160 If you say not false will be true. 60 00:04:31,800 --> 00:04:36,660 So this is all we have seen the truth tables example how the value will evaluate. 61 00:04:36,870 --> 00:04:43,710 So similarly it will happen to how for loops let you do the same task as Devi Loops but with less cords 62 00:04:43,920 --> 00:04:47,720 and the and then the operator also lets you shorten your coat. 63 00:04:48,000 --> 00:04:55,070 Now for example, if you try to enter the particular text, like if there is more than five, you again 64 00:04:55,090 --> 00:04:55,470 check. 65 00:04:55,620 --> 00:04:58,500 If two is less than four. 66 00:04:59,130 --> 00:05:00,930 Sorry you made a mistake. 67 00:05:00,930 --> 00:05:07,290 It is if then more than five columns if two less than four column. 68 00:05:08,010 --> 00:05:13,960 We say Putin fighting it fight night. 69 00:05:14,250 --> 00:05:19,620 If we say if then more than five and less than four. 70 00:05:20,730 --> 00:05:21,240 We say 71 00:05:26,400 --> 00:05:30,090 fighting in principle. 72 00:05:30,270 --> 00:05:34,950 But this is decreasing the lines of course that you are writing them. 73 00:05:35,620 --> 00:05:41,880 No, you can also replace an offensive statement with an auto operator, for example, if we try to 74 00:05:41,880 --> 00:05:54,580 see for not equal to for one condition, we are saying print see Python, we come out here and the next 75 00:05:54,600 --> 00:05:55,800 statement we give here. 76 00:05:58,320 --> 00:06:01,800 Elusive, then more than five. 77 00:06:03,180 --> 00:06:23,610 Let's check out for naughty little for all we see Prince, see Python and and save 15 more than five 78 00:06:24,480 --> 00:06:27,570 miles from Biton. 79 00:06:29,400 --> 00:06:31,860 So here again, we get the Python printer. 80 00:06:32,190 --> 00:06:42,090 Similarly, if we try to change this, we save for Synodical to four or ten more than five. 81 00:06:42,760 --> 00:06:47,460 Then we give your print, see Python. 82 00:06:49,160 --> 00:06:54,950 So we are replacing the offensive also with the help of our operators now coming to the order of the 83 00:06:55,130 --> 00:06:57,860 operations for the Bolian operators. 84 00:06:58,550 --> 00:07:00,470 Now let's try and do the same. 85 00:07:00,470 --> 00:07:04,760 Not false and false will give you false. 86 00:07:05,210 --> 00:07:12,920 Or if you say in brackets, not false and false will give you true. 87 00:07:12,920 --> 00:07:15,170 In this case, not in this case. 88 00:07:15,410 --> 00:07:18,320 The first line of code is not false, is evaluated. 89 00:07:18,530 --> 00:07:23,300 So the expression becomes true and false, which evaluates to false. 90 00:07:23,510 --> 00:07:26,580 And the second line, the parentheses are evaluated first. 91 00:07:26,810 --> 00:07:32,130 So even before the note operator, so false and false that is evaluated to false. 92 00:07:32,720 --> 00:07:35,060 So the expression not false becomes true. 93 00:07:35,900 --> 00:07:39,260 So now coming to adjusting the rule in the column variables. 94 00:07:39,590 --> 00:07:45,420 So coming back to our program here, we know now how the balloon operators basically work. 95 00:07:45,710 --> 00:07:51,320 So now there are two cases in which you will want to reset the column zero so that the next iteration 96 00:07:51,320 --> 00:07:57,080 of the loop, that the symbol is added to the first string in the list in the plaintext is still in 97 00:07:57,080 --> 00:07:58,620 the first case you want to do it of. 98 00:07:58,640 --> 00:08:02,410 The column is incremented past the last index in the plaintext. 99 00:08:03,380 --> 00:08:08,840 And in this situation, the value in column will be equal to number of columns that we have already 100 00:08:08,840 --> 00:08:09,480 passed to it. 101 00:08:09,770 --> 00:08:15,680 Second case, if it is a column in the last index and is all is pointing to a rule that has shaded box 102 00:08:15,950 --> 00:08:19,310 in the last column, as we have seen in the manual. 103 00:08:19,880 --> 00:08:24,240 So in that case, also, you want the value of the column to be incremented and rules. 104 00:08:24,710 --> 00:08:30,830 So these two cases are why the condition that we have given that that is over here in this particular 105 00:08:30,830 --> 00:08:36,200 column, if column is equal, the number of columns or column is equal, the number of columns minus 106 00:08:36,200 --> 00:08:42,560 one and two is more than equal to the number of rules and minus the number of sheet it looks. 107 00:08:42,770 --> 00:08:47,240 Now, although this is looking a very big and complicated explanation, remember that you have break 108 00:08:47,240 --> 00:08:48,470 it down into smaller parts. 109 00:08:48,890 --> 00:08:53,060 The expression one is column is equal to number of columns which exploded. 110 00:08:53,060 --> 00:08:59,990 Column variable is based on an index range and second part of the expression checks whether we have 111 00:08:59,990 --> 00:09:03,280 a column and or index that is a shaded box. 112 00:09:04,100 --> 00:09:09,500 So if either of this expression is true, the block of the court that executes will reset the column 113 00:09:09,500 --> 00:09:14,630 to the first column by setting it to zero and you will also increment the rule. 114 00:09:15,920 --> 00:09:22,190 So after this, you have finished looping over every character in the message stream and the plaintext 115 00:09:22,190 --> 00:09:26,280 list string have been modified so they are not decrypted order. 116 00:09:26,720 --> 00:09:34,790 So let's bring in the plain text SDR list are joined together in the last statement that is using the 117 00:09:35,390 --> 00:09:42,380 written statement here, which return the string that is decoded messages your function returns and 118 00:09:42,770 --> 00:09:45,260 add the first line as you have done for the earlier one. 119 00:09:45,260 --> 00:09:51,890 Also, the first line of which our program would execute is this part of the code after the important 120 00:09:51,890 --> 00:09:56,630 modules and the execution of the statement is the IF statement which will execute. 121 00:09:56,960 --> 00:10:02,870 So as for the transposition encryption program, Python checks whether this program has been run by 122 00:10:02,870 --> 00:10:06,590 checking whether the name variable is set to the string value mean. 123 00:10:06,980 --> 00:10:14,590 If so, the code executes the main function and that is how we get the output of the decrypt message. 124 00:10:15,320 --> 00:10:19,920 So that's it from the session of decrypting your transposition cipher. 125 00:10:20,180 --> 00:10:21,830 We will continue with the next issue. 126 00:10:22,030 --> 00:10:23,790 OK, that's it from the session. 127 00:10:23,810 --> 00:10:24,710 Thank you very much.