"Slave power crushes freedom of speech and of opinion. Slave power degrades labor. Slave power is arrogant, is jealous and intrusive, is cruel, is despotic, not only over the slave but over the community, the state."
Elizabeth Van Lew
Spy and Anti-Slavery Activist
Code has been around... even before computers...
Code-breaking was even the inspiration and motivation behind the creation of one of the very first working computers...
Write a program that can encode a message using the following algorithm:
To encode the following quote:
We must let go of the life we have planned, so as to accept the one that is waiting for us.
First, remove all spaces and punctuation:
Wemustletgoofthelifewehaveplannedsoastoaccepttheonethatiswaitingforus
Second, convert to all lowercase:
wemustletgoofthelifewehaveplannedsoastoaccepttheonethatiswaitingforus
Third, break the letters up into a series of "words" and put them in rows so that there are an even number of rows and columns...
There are 69 letters in this string, so we would create a "square" with 9 columns and 8 rows, like so:
wemustlet
gooftheli
fewehavep
lannedsoa
stoaccept
theonetha
tiswaitin
gforus
Hint: Take the square root of the message length, and round up!
Fourth, create new "words" by taking the letters from each column, then (fifth) output them separated by spaces
wgflsttg eoeathif mownoeso ufenaowr sthecnau thadceis levsett eleophi tipatan