Piglatin translating

558fe5180e0e8fc922d31c23ef84d240
Hi guys, I have this assignment and I have to write a program to translate file from Piglatin to english without using the split function. My code only works for a word and I can't figure out how to do it for a sentence without the split function. Thanks in advance