Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Create random seed for random function
- math.randomseed(os.time())
- Airlines = {"Delta ", "Southwest ", "American Airlines", "United ", "JetBlue ", "Air Canada ", "Allegiant Air ", "British Airways " }
- Arrival = {"BNA", "TYS", "ATL", "ORD", "MIA", "LAX", "LAS", "MCO", "SFO", "JFK", "MSP", "STL", "DCA", "SEA", "DFW", "PHX", "CLT", "DEN", "PHL", "HNL"}
- Departure = {"BNA", "TYS", "ATL", "ORD", "MIA", "LAX", "LAS", "MCO", "SFO", "JFK", "MSP", "STL", "DCA", "SEA", "DFW", "PHX", "CLT", "DEN", "PHL", "HNL"}
- Flight = math.random(1000,2000)
- Flight2 = math.random(1000,2000)
- Flight3 = math.random(1000,2000)
- Flight4 = math.random(1000,2000)
- Flight5 = math.random(1000,2000)
- Flight6 = math.random(1000,2000)
- Flight7 = math.random(1000,2000)
- Flight8 = math.random(1000,2000)
- Gate = {"A", "B", "C"}
- Number = math.random(1,8)
- Number2 = math.random(1,8)
- Number3 = math.random(1,8)
- Number4 = math.random(1,8)
- Number5 = math.random(1,8)
- Number6 = math.random(1,8)
- Number7 = math.random(1,8)
- Number8 = math.random(1,8)
- Time = {"0000", "0100", "0200", "0300", "0400", "0500", "0600", "0700", "0800", "0900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300"}
- Status = {"On Time", "Delayed", "Cancelled"}
- print("Airline Flight From Gate Time Status")
- print(" ")
- print("".. Airlines[math.random(1,#Airlines)].. " " ..Flight .. " " .. Arrival[math.random(1,#Arrival)].. " " .. Gate[math.random(1,#Gate)] .. Number .. " " .. Time[math.random(1,#Time)] .. " " .. Status[math.random(1,#Status)] .. " " .. " ")
- print("".. Airlines[math.random(1,#Airlines)].. " " ..Flight2 .. " " .. Arrival[math.random(1,#Arrival)].. " " .. Gate[math.random(1,#Gate)] .. Number2 .. " " .. Time[math.random(1,#Time)] .. " " .. Status[math.random(1,#Status)] .. " " .. " ")
- print("".. Airlines[math.random(1,#Airlines)].. " " ..Flight3 .. " " .. Arrival[math.random(1,#Arrival)].. " " .. Gate[math.random(1,#Gate)] .. Number3 .. " " .. Time[math.random(1,#Time)] .. " " .. Status[math.random(1,#Status)] .. " " .. " ")
- print("".. Airlines[math.random(1,#Airlines)].. " " ..Flight4 .. " " .. Arrival[math.random(1,#Arrival)].. " " .. Gate[math.random(1,#Gate)] .. Number4 .. " " .. Time[math.random(1,#Time)] .. " " .. Status[math.random(1,#Status)] .. " " .. " ")
- print("".. Airlines[math.random(1,#Airlines)].. " " ..Flight5 .. " " .. Arrival[math.random(1,#Arrival)].. " " .. Gate[math.random(1,#Gate)] .. Number5 .. " " .. Time[math.random(1,#Time)] .. " " .. Status[math.random(1,#Status)] .. " " .. " ")
- print("".. Airlines[math.random(1,#Airlines)].. " " ..Flight6 .. " " .. Arrival[math.random(1,#Arrival)].. " " .. Gate[math.random(1,#Gate)] .. Number6 .. " " .. Time[math.random(1,#Time)] .. " " .. Status[math.random(1,#Status)] .. " " .. " ")
- print("".. Airlines[math.random(1,#Airlines)].. " " ..Flight7 .. " " .. Arrival[math.random(1,#Arrival)].. " " .. Gate[math.random(1,#Gate)] .. Number7 .. " " .. Time[math.random(1,#Time)] .. " " .. Status[math.random(1,#Status)] .. " " .. " ")
- print("".. Airlines[math.random(1,#Airlines)].. " " ..Flight8 .. " " .. Arrival[math.random(1,#Arrival)].. " " .. Gate[math.random(1,#Gate)] .. Number8 .. " " .. Time[math.random(1,#Time)] .. " " .. Status[math.random(1,#Status)] .. " " .. " ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement