Activity 2.18

Source Code

print("Activity 2.18")
print()
print("Menu")
print("E1 - Example 1")
print("Q - Quit")
io.write("Choice: ")
local choice = io.read()
if choice == "E1" then
    print("Example 1")
    -- add Example 1 code below


elseif choice == "E2" then
    print("Example 2")
    -- add Example 2 code below



elseif choice == "E3" then
    print("Example 3")
    -- add Example 3 code below


elseif choice == "E4" then
    print("Example 4")
    -- add Example 4 code below


elseif choice == "E5" then
    print("Example 5")
    -- add Example 5 code below


elseif choice == "Q" then
    print("Quit!")
    done = true
else
    print("Invalid Choice")
end

a218problem1.lua

a218problem2.lua

a218problem3.lua

a218problem4.lua

a218problem5.lua

Last updated

Was this helpful?