You are viewing a single comment's thread. Return to all comments →
def encryption(s): row, column = math.floor(math.sqrt(len(s))) , math.ceil(math.sqrt(len(s))) str = '' for x in range(column): for y in range(x, len(s), column): str = str + s[y] str = str + ' ' return str
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 →
using nested loop in python:
def encryption(s): row, column = math.floor(math.sqrt(len(s))) , math.ceil(math.sqrt(len(s))) str = '' for x in range(column): for y in range(x, len(s), column): str = str + s[y] str = str + ' ' return str