locked
Need help with coding a Pig Latin Translator RRS feed

  • Question

  • Hello! I need help with coding a pig latin translator!

    I need help with vowels, caps, puctuations, and sentences. 

    This is what I have :

    TextWindow.WriteLine("Pig Latin Translator")
    TextWindow.WriteLine("By Kaylanie Saldua")
    TextWindow.WriteLine("")
    TextWindow.WriteLine("")
    TextWindow.WriteLine("

    Sub translation
    While "true"
     TextWindow.Write("Enter a word/phrase/sentence to be translated:")

       word = TextWindow.Read()

       pigLatin = Text.GetSubTextToEnd(word, 2) 

       pigLatin = pigLatin + Text.GetSubText(word, 1, 1)

    pigLatin = pigLatin + "ay"    

    TextWindow.WriteLine("")
       TextWindow.WriteLine(pigLatin)                   

       TextWindow.WriteLine("") 

    EndWhile
      EndSub 

    Friday, February 10, 2017 12:30 AM

Answers

  • KayKay5,

    The textwindow.writeline before the sub needs to be completed (TextWindow.Writeline(""). Then right after that type in the word as shown: translation() as a line below the textwindow.writeline. That line gets the program to do the sub.

    Good start on coding your program.


    JR

    • Proposed as answer by litdev Tuesday, February 14, 2017 8:43 PM
    • Marked as answer by WhTurner33Editor Sunday, February 19, 2017 5:03 PM
    Friday, February 10, 2017 12:52 PM
    Answerer