Yeah it was quite a tough paper especially the algorithm questions towards the end. The one where you needed to swap the letters and rearrange their position i was stuck as to move the swapped string to the front and not the back by modifying the append module somehow.
From the best of my memory I did:
BEGIN Encrypt
get originalString
stringLength = Length(originalString)
encryptedString = Middle(originalString,10)
encryptedString = Flip(encryptedString)
leftChars = Left(originalString,stringLength/2-5)
leftChars = Flip(leftChars)
encryptedString = Append(leftChars,encryptedString)
rightChars = Right(originalString,stringLength/2+5)
rightChars = Flip(rightChars)
encryptedString = Append(encryptedString,rightChars)
END Encrypt
The example encryption in the exam: "computersaregreat!" encrypts to "pmocrgerasretu!tae"
(I have an odd memory with some things)
This question was weirdly set out in a way that there were no conditional statements or loops needed, wasn't my favourite.