Welcome back.
I will discuss with you the algorithm for rotation now before we can just go and watch these two videos
on Python device operations in YouTube.
And also we saw a number in YouTube.
So I'll tell you what, to us, having understood them, then you come back and you'll be able to understand
better the algorithm.
The permutation actually is a combination, that transformation is a permutation.
So here we have a main function which will run this function, run here and the function run here.
This part is just to test the function either for Farenheit is the that is a function that will iterate
drew every bits in the string and do some kind of permutation.
So here is after permutation, you're supposed to get this and before permutation, what is Denisova
after?
So here we are creating a list.
By taking the after permutation list and for every bit I've been one to five beat, which gives you
32 in number, then you create a new list called Before Permutation, then you print out the result.
So the important part is, despite the Raufi, I call it Raufi for rotation, my first barometer is
the argument to the function, and the second one is how many bits you and with.
Now, if you watched the video, which I just showed you just now, the two YouTube video, you understand
that in order to implement a rotation algorithm, you need to have two of this operation may shift.
Right.
And all the shift left five minutes I because the number of bits that we are limiting it to is five
and inspire the to find this.
That's why you're doing enu.
So for we use this information to go through every one of the numbers in here, eight, nine, three,
four and so on, and do the rotation.
So that is what this is doing.
And then here is where you perform the iteration for four days on ice, plus zero fighting ending with
one is coming from here.
So we're just implementing this in Python over here and here is if you do the rotation and everything
is up.
So now here we are going to bring up.
So this one is.
No, we are copying it from here.
You're copping here because this is what he's comparing to.
So this is the end of the permutation.
We are not doing a reverse permutation, define what number to enter, who caused it to end up like
this.
After you go through the permutation transformation, you're right.
So we are doing it in reverse and that's how it's how we write this Python script.
And then now we are going to run by the script and see what the guy says.
So I'm going to say this and then we are going to be writing three.
So, boy, and you're going to get a result.
So this is the password, right?
So what he has done is he has taken this this number and reversed it to get this.
I mean, this is why you supposin put.
So when he put this issue, he would go through the process of transforming to become this No.
All right, so the pythons clearly just to reverse the transformation algorithm, which is in sight
here and here, they are reversing this.
So we are doing OK.
So now here you can copy.
These are.
Computers are we have to generate the key using x1 x2 sorry, we base our password here.
Presenter And we are looking key.
So we copy Key and you're unhappy to.
And now we are seeing our queen here a bit of heat enter.
If you a tree now you find a low level tree, there's a new hole in it.
So now you're going to copy the out into a tree, likely go to the Panditji NPC here and you enter this.
Now you have like a tree waiting for you.
It is not really necessary for you to understand every single bit of the input of the operation is quite
advanced, actually, the algorithm.
The important thing to take away from all this is that knowing how to combine all the comments here
like this and also knowing how to rename labels and other important, useful thing to notice if you
enter if you're into F.J..
And you enter in the transform here, you will notice some new concept is found here.
So whenever you see Cardsharp, as are 14 here, this is the indication.
This is a very.
Auto industry 14 is offsetting every all right.
So A14 is your connector for the aluminum nery.
The same thing is happening here.
This upholstering is actually your G buffer.
So you do before we show your earlier injury.
And then here, Artemesia, your first elementary and secondary.
So that is what's happening.
So these are the new digs here, whenever you see this, you can see right there coming here is.
So it is easier for you to understand.
So these are things you should take the take away from this lesson.
Not really to understand the algorithm and how the reverse algorithm, but more importantly, to know
how to put your comments and rename labels so that it's easier to read like this.
Don't worry if you don't understand how the garden is created, how to reverse how we write this Python
script is not important.
So that's all for this video.
I'll see you in the next one.
Thank you for watching.