Question: Write a function map coords to char that takes one argument: filename, please use Pyhton to solve the problem Part IV: The Double Cipher: Map

 Write a function map coords to char that takes one argument:

Write a function map coords to char that takes one argument: filename, please use Pyhton to solve the problem

Part IV: The Double Cipher: Map Coordinates to Character (10 points) Write a function map.coords.to.char that takes one argument: filename, which is a file that will be used to build the second of two dictionaries for implementing the Double Cipher algorithm. The function maps coordinate positions in the 6 x 6 grid to characters. Each coordinate pair is represented as a tuple. For example, in the sample file from Part III, the the key (3,4) will map to the value , T. Examples: Function Call map coords.to.char ('key1.txt') See Mapping 1' below map.coords.to.char ('key2.txt' See Mapping 2' below map.coords.to.char ('key3.txt') SeeMapping 3' below Return Value The file represents a encryption key/mechanism. In the file, you will find uppercase letters (A-Z) and digits (0-9) randomly spread in a 6 x 6 shaped grid. In each row, you will find letters and/or numbers separated by spaces. For example, the contents of a sample file looks like this L9C3W5 7GJRS8 Mapping 1: (keyl.txt) (6, 4) - o (5, 2) -G (6, 3) -4 (4, 3)-C Mapping 2: (key2.txt) (6, 4) -3 (4, 5)-Q (5, 5) - C (5, 4) >N (2, 6 -> Z (4, 2) (3, 5)>L (3, 3) 0 (3, 4) -2 (3, 1 ->G (6, 3)-F (6, 2) -I 4, 3) ->R (5, 6)> 4 Mapping 3 (key3.txt) (6, 6) -R(4, 5) -> H (4, 6)-8 (2, 1 -> M (4, 2)> 3 (3, 3)> U (3, 1 ->0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!