So now let's continue and see how the mapping function vocal now that we have defined a lot of mapping
can function, let us try using them in an interactive shell of Python to better understand how they
work together.
For this, let's create an interactive Saiful map for the ciphertext.
We will create your order to open up a new file and we would use this for later.
Mapping for ciphertext.
Put it in capital so all q i edg x i r c p g and it stays sibylle q are set.
Gave me and said the space m b b ss i p l would close the single quotation now, which this particular
ciphertext contains just three Saiful votes.
So we'll do this by basically creating a mapping for each word and then combining the mappings.
So for that the first thing will have to import here is the hacker function that we have created.
So if we go to over python hacking advanceable course, the name of the Hackl function, we have created
this simple sub hacker.
So if we go back here, we see in Fort C, simple sub
heckel.
OK, let's open up the.
Fine doctors in each drive samples of hacker and letters from the module once and once this is done.
Now let's give import a simple sample.
Now it's done.
So let's close this particular file.
Now, once the import is done next, we will call the function.
Now, let us just keep the file open so that we are able to understand the functions that we have.
So we'll go back to our E drive by them hacking advanced level and this particular function.
So now you'll we need to call up the functions that get Blanky Falletta mappings.
So if we look at it, we are having this function here.
So.
Let us see here one object say, let the mapping last year, one is equal to we are seeing simple sub
hackle dot.
Segert blank, Saifullah, maybe one, and then if we try to print the letter mapping SDR one, you
will get everything initially blank.
So let's start hacking the first cyberwar vote that we have now.
What is the foresightful war that we have if we check in on NPR?
This is our first Saiful vote that we want to happen.
Now, to have this will have to force me to get the vote battle for the Saiful vote.
So we'll have to call the makework party module in that thing may get verbatim function.
So if we go back to over hacking program, we have this make war button one.
If we try to open up this in just for our reference we're having it, does us get one button SGA for
this function we're supposed to call.
OK, so let's cooperate on this and the final word, button one.
So if we go back here in the Biton, shall we say import same week war button one, it does make war.
But don't these capital sorry, import for me, go button one, OK, and after this we will see our
make war button one does not get the word button to steal and let us go down this road here, OK?
And let's press enter.
So this is how we are getting the world bottom right now to figure out which English word in the dictionary
have this water bottle.
OK, now we need to import for this the Warburton module and we have to look up for this particular
pattern.
So now if we go back to our program where we have the vote patterns one, so we'll have to see the import
Savol
patterns one.
And after this import, we create three candidates.
SDR is equal to four, Batten's one, what we call here, all buttons.
And in this, we pass this pattern.
Just copy this, paste it here in single quotation marks.
And after that, if you try to get candidate SDR, you try to print this.
You are getting the dual pattern and this one is uncomfortable.
One is uncomfortably so.
Two English votes match the given verbatim.
Therefore, the only two votes in the full Saiful vote could describe to us either uncomfortable or
uncomfortable.
So these words are our candidate is to restore them in the variable as we have done here.
Now next we need to map their letters to our Saiful Vote letter using the add letters to the mapping
function.
So first of all, we will map the uncomfortable by accessing the first member of the candidate list.
So over here we would see, for example, a little map and one is equal to now.
We are having a simple sub hackle that dot.
Now let us open the symbols of Zakarin, but just to see the method that we have is and let those two
mappings.
So let's go on this and go back to my.
And here we are going to pass the letter mapping one comma.
Now the let up map and one here we are passing this law in single quotation marks and with that we are
passing the candidate SDR.
What are the index?
Zero and.
Dumping one is not defined or are seeing your letter, mapping one is equal to.
The function don't add letters to Muffin one because they're the little mopping one, the value for
it and the value of candidates.
OK, here we are having this baby a little mopping Aschiana.
So if you're we are seeing the
later mopping one is equal to three symbols of Hackl Dot C and letters to my being one.
Here we are supposed to pass C letter mapping SDR, one which we have created here.
So this one will be passed here after which we need to pass the first to vote from our text and then
we will pass.
Candidate is still at the index zero.
OK.