Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please use python program to answer it thanks Part IV: The Double Cipher: Map Coordinates to Character (10 points) Write a function map.coords.to.char that takes

Please use python program to answer it thanks
image text in transcribed
Part IV: The Double Cipher: Map Coordinates to Character (10 points) Write a function map.coords.to.char that takes one argumet: 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 Examples: Function Call map.coords.to-char, keyl.txt,) | See ,Happ.ng 1, below map.coords.to.char(key2.txt' See Mapping 2' below map.coords.to.char'key3.txt') See Mapping 3' below Return Value Mapping 1: (keyl.txt (3, 6 -2 (4, 5)->(5,4R2,1) 1 (6, 6) -F (4, 6)-5 (5, 1 -4, 2)-9 (2, 5->E 6, 5->V 3, 5)-D.2) B (3, 4) -T (4. 4)-3 (5, 2) -G (, 5- 0 ->P(5, 6>8 5, 3)4, 1) -L,Y (2, 3) >I Mapping 2: (key2.txt) 6. 4)>3 3, 6)-> v (5, 5) C(2, 6> 2 (5, 14, 2)->U(2, 5)-Y (6, 1 ->M 3, 1)G(5, 2)J (4, 3) R(2, 2) S 6, 5)> T 3, 4)>2 (3, 3-0 (6, 3-F (6, 2)-I (5, 6) -4 Mapping 3: (key3.txt) (3, 6-P (6, (4, 6 6 R 8 -> -> (5, 5) B(2, 6)> I (2, 5 -> V (6, 5)-(3, 5)2)-G3, 3)->U 3, 4)>2 4. 4)> F (6, 2->T (2, 3)- 6 6, 1>4 (4, 3)Y(2, 2) ->x (5, 6) -S

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions