So coming ahead, we are moving for displaying the happy results to the user when the program calls
the brain function to display your a map and one the original message and the decrypted message on the
screen up front.
So basically, we're storing the decrypted message in a variable named as hacked message one which is
copied to the clipboard and printed on the screen so that the user can compare it to the original message.
OK, we then use the the mapping one to find the decrypted message, which is defined later in the program.
So next, we look at all the functions that create of mappings coming to creating the mapping the program,
the follicle mapping for each cipher in the ciphertext.
So to create a complete mapping, we will need several helper functions created.
One of those helper functions will set up a new site for mapping so we can call it for every site for
another function will take over its current mapping and the candidate collection to find all the candidate
decryption what we'll call this function for each Saiful word and each candidate.
Then the function will then add all the potential decryption letters from the candidate for the final
words, like a mapping and then mapping to it.
When we have the mapping for several votes from over ciphertext, we will use a function to merge them
together and then we will use the final helper function to solve as many Saiful as those decryption
as we can by matching one decryption letter to each side.
So I know we won't always be able to solve all this, but you will find out how to deal with this issue
in the decrypting the messages.
So if we come to creating a blank map like we have created over here by defining the function, so we
need to create a blank.
Saifullah, the mapping when we call this blank or get blank mapping one function, it returns a dictionary
with the key to one character string of all the twenty six letters of the alphabet.
OK, now moving to adding the letters to the map.
OK, now the letters to a mapping we have defined and those two mapping one function.
Now this function that we have created takes three parameters.
A Saiful little Nekesa mapping one Saiful war to map Nafisa decipherable one and the decryption vote
safe would be great if that is the candidate.
What now.
The function maps every letter in the candidate one to the little one and the corresponding indexes
position in the civil war.
OK and x that led to the mapping one if it isn't already there, for example, like when initially we
had done on a paper and pen that, for example, if you have set up why that is, but B is a candidate
for decipherable to Etch A Sketch, you then add those two mapping function.
What are the values.
B the key in that mappings, then the function moves to the next leader and appoints you to the list
value paired with the key and so on.
And if the letter is already in the list of potential decryption letters.
Then your ad, Alekos to Mapping doesn't add that to the list.
So, for example, in a puppy, it would be the key for the next two instances because the it's already
there.
So finally, the function changes the value for the EU.
So it has value in its list of the potential decryption levels.
Now, the code in this ad goes to mapping.
One assumes that the length of your sizable one is the same as the length of candidate one because you
should only vote on a candidate one third with matching wallpapers.
Then the program iterate over each index in the string, indecipherable one to check if the letter has
already been added to the list of the potential decryption letters.
So when we say for AI in the range of Lenthall Safeword one, we say if the candidate one at the index
of I'm not in the letter mapping one index of five will vote one out, then we let the mapping one at
the index of Saiful one door got Apprendi.
Candidate one at the index.
So we'll use the variable.
I here to agree to each letter of the Saiful vote one and its corresponding potential decryption letter
in the candidate one to index.
We can do this because the potential decryption letter to be added is candidate one of the index of
a four letter word one index.
So for example, of this I followed with a letter to the candidate was copy.
I would start at the index zero and we will use word zero and one zero to access the force levels in
each string.
Then the execution would move on to the if statement and the if statement checks that the potential
decryption letter candidate won.
I is not already on the list of potential decryption letters and doesn't add it if it's already in the
list.
So it does this by accessing this little one in the mapping with your already mapping one and the index
of Safwat Index because I followed one and this is the key of the mapping that needs to be accessed.
Now this check prevents duplicate letters in the list of potential decryption letters, for example,
the full we might be added to the list of mappings, one of the first iteration of.
But when I is equal to that is the code intersection be from candidate at the index to wouldn't be added
to the mapping because it was already added at the full stipulation.
So if the potential decryption letter isn't already in the mapping, it adds a new letter in candidate.
I add to the list of potential decryption that inside those mapping let the mapping one index five one
InDesign.
Now recall that because Python is a copy of the reference to a dictionary parsed for a parameter instead
of a copy of the dictionary itself.
Any changes made to the mappings?
One in this function will be done outside of the agricultural mapping function as well.
This is because both copies of the reference still refer to the same dictionary passed for letter mapping.
One parameter in the call goes to mapping.
So after looping through all the indexes in this, I followed one.
The function is done, adding Lykos to mapping in the mapping one variable.
OK, so now let's look at how the program compares this mapping to that of other sites will vote to
check for the overlaps.
OK, so we come to the intersecting of two methods.
Now we have the simplest function.
OK, which uses the Intersect mappings one to take two, three, four letter mapping fast as its map
A1 and my V1 parameters.
OK, and this basically returns a more mapping of map even as we win over here.
OK, so the Intersect mapping function instructs the program to combine this even and even create a
blank map and then add the potential decryption letters to your blank map only of the existing book.
OK, so to prevent the duplication.
So when we are defining the material for the map, we say intercepted mapping one is equal to get the
blanks for little mappings, which creates all.
Saifullah, the mapping the story merge mapping by calling this method here and towards the written
value in intersect mapping mappings.
One variable.
OK, now before loop or below this which we are using previously for like those one in Lykos.
OK, now in this, through this uppercase letters in the letter, this constant variable and uses the
letters, one that is the variable we have used as the key of map A1 and we will dictionary.
OK, not after giving this.
We are checking whether the list of potential decryption letters of event is blank.
So we do that over here in the if a blank list means that this letter would potentially be.
So in this case, in the of Saifullah mapping just one piece of the mapping list of the potential decryption
letters, for example, the list of potential decryption letters map even is blank.
Then the intercepted mapping list will be copied to list in map vivants.
Hence we are seeing here intercepted mapping.
One at the index of local one is copied or floppy might be even at the time.
Similarly, viceversa is done over here when we check for Vivaan.
OK, so it is copied from evah.
OK now here on the block.
Given who handles the case in which neither map even more map even is blank.
So when the map is not they are not blank, it loops through the uppercase letters in the list of map
even at the index of little.
OK and then check with the uppercase letter in map.
A1 also exists in the list of uppercase letters in Map B one.
If it does, they are intercepted mapping one of the next letter.
One, we are adding this common letter to the list of potential decryption letters by saying so after
the four.
That's all started over here in the is the Saifullah mapping.
Intercepted mappings should only have the potential decryption letters that exist in the list of potential
decryption letters of both even or not even a map.
OK, so this completely intercepted political map is now in the next session.
We look at an example out of an intercepted moppets.
So that's it from this session.
We will see more in the next minutes.
Thank you very much.