0

Basically unsure about if I can pass two args from function '1' to function '2', it doesn't seem to work. However If I unpack the arguments from the function'2' then call them within function'1' it works as intended i'm not very experienced at all and have ran out of ideas.

Best regards and many thanks

#!/usr/bin/python3.4
"""Program to encode and decode using column transposition cipher"""
import numpy as np
import math


def get_user_input():
    """Gets the key and plaintext"""
    key = input('Enter key: ')
    mystring = input('Enter Message: ').replace(' ', '')
    return key, mystring


def columns_rows(key, mystring):
    """Returns Rows and Columns for matrix"""
    rows = len(key)
    columns = math.ceil(len(mystring) / 6)
    return columns, rows


def create_matrix(columns, rows):
    """Creates a Matrix large enough for text"""
    matrix = np.zeros((columns, rows))
    print(matrix)  # This will be return print for testing purposes

columns_rows(get_user_input())
Dead_Ling0
  • 171
  • 1
  • 1
  • 13

0 Answers0