Mar-06-2020, 03:34 PM
Hi All,
I need help in Bifid Key Generation
I have Skeleton file:
Thanks in advance
I need help in Bifid Key Generation
I have Skeleton file:
def uoc_bifid_genkey(keyword, period): """ EXERCISE 1: Bifid Key Generation :keyword: string with the key word :period: period of the groups :return: list with the matrix and the period """ square = [] # --- IMPLEMENTATION GOES HERE --- # -------------------------------- return [square, period]And I have test file with this code:
def test_1(self): key = uoc_bifid_genkey("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", 5) exp_key = [[['A', 'B', 'C', 'D', 'E', 'F'], ['G', 'H', 'I', 'J', 'K', 'L'], ['M', 'N', 'O', 'P', 'Q', 'R'], ['S', 'T', 'U', 'V', 'W', 'X'], ['Y', 'Z', '0', '1', '2', '3'], ['4', '5', '6', '7', '8', '9']], 5] self.assertEqual(key, exp_key)Please help me to solve this. I am new in Phython.
Thanks in advance