我的方法在正确工作方面是错误的,可以找出如何将文本放入表中(playfair密码)

时间:2013-10-27 23:14:36

标签: python

def print_table():
    for row in range(5):
        for col in range(5):
            print table[row][col],
        print ""

def clear_table():
    for row in range(5):
        for col in range(5):
            table[row][col] = "*"

def table_has_letter(letter):
    for letter in clear_table:
        if letter in clear_table:
            print true
        else:
            print false

def create_table(secret):
    clear_table()
    secret = secret.upper()
    secret.replace(" ","")
    secret.split(",")
    for col in range(5):
        row = 1
        if len(secret) % 5: 
            row += 1
        print [len(secret) % 5]
        print secret[col]

create_table("playfair")
print_table()

0 个答案:

没有答案