Python Forum
Bifid Genkey (Urgent)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bifid Genkey (Urgent)
#1
Hi All,

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
Reply
#2
What have you tried so far?
Sorry, didn't see for lack of code tags
Reply
#3
Since this was marked as urgent I imagine the OP's deadline has past, but in general this is a good example of a thread that could have been written better. I know nothing about Bifid Key Generation, and the OP didn't help us to help them by providing any details, or an attempt with an excepted vs actual result.

To the OP: we'd be happy to help in the future, but you should really take a moment to taken our perspective - we want to help, and we'd like to do so with as little effort as possible, so explaining what you're stuck on rather than what your assignment is goes a long way.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation Python Homework (Urgent help needed!!) chickenseizuresalad 6 4,296 Oct-11-2021, 01:59 AM
Last Post: Underscore
Exclamation urgent , Python homework alm 2 2,313 May-09-2021, 11:19 AM
Last Post: Yoriz
  urgent I got a syntax errors alm 2 5,877 Feb-28-2021, 02:54 PM
Last Post: alm
Heart Urgent homework help needed Medou 4 2,735 Nov-24-2020, 09:28 AM
Last Post: buran
  [Urgent] build code GodMaster 2 1,810 Mar-23-2020, 12:25 AM
Last Post: jefsummers
  Python Homework Help *Urgent GS31 2 2,589 Nov-24-2019, 01:41 PM
Last Post: ichabod801
  Need help! Please! Urgent! foxylen 1 2,300 Feb-27-2019, 05:50 PM
Last Post: buran
  (Not urgent) IDLE issue with methods vinfer12 5 3,964 Mar-22-2018, 09:00 PM
Last Post: Gribouillis
  Machine Learning Antivirus [Urgent] Echoo0o 4 4,902 Jul-28-2017, 01:57 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020