You are viewing a single comment's thread. Return to all comments →
def encryption(s): # Write your code here s = s.replace(" ", "") n = len(s) st = [] # rows = math.floor(math.sqrt(n)) columns = math.ceil(math.sqrt(n)) # constraint given # if rows * columns < n: # rows = columns for i in range(columns): temp = '' for j in range(i, n, columns): temp += s[j] st.append(temp) return " ".join(st)
Seems like cookies are disabled on this browser, please enable them to open this website
Encryption
You are viewing a single comment's thread. Return to all comments →