Posted 19 July 2015 - 03:59 AM
Hello ComputerCraft Forums!
My name is LarzTheFrog, and I am a new at programming with lua, however I wanted to share with you all this fun little program that converts words into Pyg Latin!
Download - http://pastebin.com/GuFVJzYi
Thank you all for reading, any feedback and suggestions would be appreciated.
My name is LarzTheFrog, and I am a new at programming with lua, however I wanted to share with you all this fun little program that converts words into Pyg Latin!
--------------------------------------------------
--Variables--
local original
local pyg = "ay"
local first
local second
local final
local end1
local loop
--------------------------------------------------
--Functions--
local function clear()
term.clear()
term.setCursorPos()
end
--------------------------------------------------
--Main Code--
print("Welcome to Pyg Latin Translator!")
print("Please enter a word to translate:")
original = tostring(read())
first = original:sub(1,1)
second = original..first
final = second..pyg
print("")
print(final:sub(2,1000))
print("")
--------------------------------------------------
--Ending--
print("Type \"e\" to end")
repeat
end1 = read()
if end1 == "e" then
os.reboot()
else
print("Incorrect input")
end
until end1 == "e"
--------------------------------------------------
Download - http://pastebin.com/GuFVJzYi
Thank you all for reading, any feedback and suggestions would be appreciated.
Edited on 19 July 2015 - 02:20 AM