1 00:00:00,150 --> 00:00:06,720 So now here you are saying how many times we're getting this forced, these ads, so message is having 2 00:00:06,720 --> 00:00:07,520 to translate. 3 00:00:07,530 --> 00:00:14,690 It is having to then message is having it translated as having it, then it is having I it is also having 4 00:00:14,700 --> 00:00:18,370 I saw one one value is keep on driving over here. 5 00:00:18,990 --> 00:00:22,280 OK, so at the end of it, what is the value in this. 6 00:00:22,590 --> 00:00:25,700 This is Python hacking session when we are doing the review site. 7 00:00:26,430 --> 00:00:26,690 Right. 8 00:00:26,790 --> 00:00:30,240 So whatever text we were having, it did one by one. 9 00:00:30,510 --> 00:00:33,300 We are adding it in this reverse order. 10 00:00:33,300 --> 00:00:37,670 One one character by character is getting added if you get the output. 11 00:00:37,670 --> 00:00:44,670 So now we hope that the output is very much geared at how many times the loop basically gets executed. 12 00:00:44,800 --> 00:00:45,220 Right. 13 00:00:46,030 --> 00:00:53,990 OK, now let's go ahead for improving this particular program by giving it a more input from the program. 14 00:00:54,300 --> 00:01:00,590 What we have designed over here is having a string that is being encrypted or decrypted, which is type 15 00:01:00,630 --> 00:01:03,950 directly into the source code as an assignment statement. 16 00:01:03,960 --> 00:01:10,050 Right now, this is convenient while we are developing the program, but you shouldn't expect users 17 00:01:10,050 --> 00:01:12,870 to be comfortable modifying the source code themselves. 18 00:01:13,170 --> 00:01:19,770 So to make the program easier to use and share, you can modify the assignment statement so that they 19 00:01:19,770 --> 00:01:21,100 call the input function. 20 00:01:21,390 --> 00:01:23,820 You can also pass a string to the input function. 21 00:01:23,820 --> 00:01:28,710 So it is displayed as a prompt for the user to enter a particular string to encrypt. 22 00:01:28,950 --> 00:01:35,400 OK, now, for example, if we go back to our program, OK, over here, when we are giving this message, 23 00:01:35,700 --> 00:01:40,100 we will remove this particular text which is appearing here, OK? 24 00:01:40,110 --> 00:01:44,820 And here we would give, say, input in bracket, we say. 25 00:01:46,440 --> 00:01:53,230 Single center message to encrypted. 26 00:01:56,480 --> 00:01:59,900 OK, after this, we get this value in the message. 27 00:02:00,680 --> 00:02:04,650 Now, we will not give this print come on, as it will just increase the line of code. 28 00:02:05,030 --> 00:02:07,380 Then finally, we will decrypt this over here. 29 00:02:07,520 --> 00:02:13,010 OK, so now when you run the particular program, it prints on the prompter, the screen that innovates 30 00:02:13,010 --> 00:02:18,290 for the user to enter the particular message, the message that user will end up will be stored as the 31 00:02:18,290 --> 00:02:19,370 value in the message. 32 00:02:19,580 --> 00:02:24,540 And then when you run this program here, you will get that string to be encrypted. 33 00:02:24,830 --> 00:02:29,210 So let us save this and let us try to run this particular program. 34 00:02:29,600 --> 00:02:33,810 So now here it asks for us to enter the particular valley right now. 35 00:02:33,830 --> 00:02:35,780 Suppose we say this is. 36 00:02:38,520 --> 00:02:40,520 Fighting, hacking. 37 00:02:41,790 --> 00:02:47,460 So whatever string you have under the same string, it is reversing and giving of the output. 38 00:02:47,820 --> 00:02:51,690 Now, for example, you want to enter the string, so let us copy this. 39 00:02:52,020 --> 00:02:54,070 And again, we'll go back here. 40 00:02:54,200 --> 00:03:00,030 We will run the module now will face the same string that was encrypted to decrypt it. 41 00:03:00,360 --> 00:03:01,770 So we press enter again. 42 00:03:01,770 --> 00:03:04,270 We get the string in the decrypted format. 43 00:03:04,440 --> 00:03:04,790 Right. 44 00:03:05,730 --> 00:03:09,050 OK, now let us try one more piece of code directly over here. 45 00:03:09,060 --> 00:03:10,740 We say print in bracket. 46 00:03:11,160 --> 00:03:19,200 We use the land function we use here, C Biton again, we use a plus operator. 47 00:03:19,200 --> 00:03:25,610 We use lenth again, we give Vitan and we close it so we get the Lenfest. 48 00:03:25,620 --> 00:03:27,990 Well that is the six characters. 49 00:03:28,350 --> 00:03:33,580 Plus we have already added one more six plus a total of this becomes us to it. 50 00:03:33,960 --> 00:03:38,150 So what length of this plus the length of this we are getting at over here printed. 51 00:03:38,580 --> 00:03:38,970 Right. 52 00:03:39,060 --> 00:03:50,460 Similarly if suppose we see for example C is equal to zero, ok, we say while I is less than four, 53 00:03:50,850 --> 00:03:57,270 then we are seeing print C Biton. 54 00:03:58,930 --> 00:04:03,970 OK, and we make I it was too eye plus one. 55 00:04:07,330 --> 00:04:13,310 OK, so when we type this, we just press once more and we get the value there four times, right? 56 00:04:13,490 --> 00:04:16,870 Similarly, suppose we try to do is equal to zero. 57 00:04:17,300 --> 00:04:21,380 We say another variable is equal to say pattern. 58 00:04:21,890 --> 00:04:26,570 We see while the value of AI is less than five then. 59 00:04:28,460 --> 00:04:37,850 OK, let's do one more thing I'll say I is less than five Colen, we have Mystikal and then we say spane 60 00:04:37,850 --> 00:04:40,770 is equal to spam spam at the next. 61 00:04:41,900 --> 00:04:43,550 OK, we are again adding this value. 62 00:04:43,550 --> 00:04:46,610 Then we say, I was stop I plus one. 63 00:04:46,910 --> 00:04:49,520 Then here we say print. 64 00:04:50,970 --> 00:04:56,880 The value of spam sabrin spam. 65 00:04:57,900 --> 00:05:01,160 So here we see getting one one value added. 66 00:05:01,470 --> 00:05:07,560 The first thing is we had Python then in that we are adding one one character of this variable over 67 00:05:07,560 --> 00:05:08,310 there for first time. 68 00:05:08,330 --> 00:05:14,460 And that'd be next time by then, by B, B by the be all. 69 00:05:14,610 --> 00:05:19,020 And then we have since we have gone till five and is not added. 70 00:05:19,020 --> 00:05:25,500 If Stupples let us cooperate on this and here we will change this to six. 71 00:05:25,710 --> 00:05:32,990 OK, now so here it is added all the values total at the end of it. 72 00:05:33,000 --> 00:05:35,040 What it is going for six times. 73 00:05:35,460 --> 00:05:35,840 Right. 74 00:05:36,780 --> 00:05:39,350 So now we'll see some extra examples. 75 00:05:39,360 --> 00:05:43,170 We will do it on reverse cipher, which will mean our concepts of remorse. 76 00:05:43,200 --> 00:05:44,400 I feel very much clear.