You are viewing a single comment's thread. Return to all comments →
def encryption(s): # Write your code here n = len(s) x = math.sqrt(n) # nr = math.floor(1x) nc = math.ceil(x) # print(n, nc) i = 0 j = 0 q = [] for _ in range(n): if i+j > n-1: q.append(' ') j += 1 i = 0 q.append(s[i+j]) i += nc return ''.join(q)
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 →