-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.lua
58 lines (58 loc) · 1.56 KB
/
Main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
local correctAnswer ="Berlin"
local correctAnswer2 = 4
local correctAnswer3 = 13
local correctAnswer4 = 1998
local correctAnswer5 = 32
function wait(x)
local tk = os.clock()
while os.clock() - tk <= x do end
end
print("What is the capital city of Germany")
input = io.read()
if(input == correctAnswer) then
print("You got it right")
print("You've advanced to Round 2")
else
print(correctAnswer .. " Was the correct answer")
end
wait(2)
print("What is 2+2?")
input = io.read()
local number = (tonumber(input))
if (number == correctAnswer2) then
print("You got it right")
print("You've advanced to Round 3")
else
print(correctAnswer2 .. " Was the correct answer")
end
wait(2)
print("How much are there in a baker's dozen?")
input = io.read()
local number = (tonumber(input))
if (number == correctAnswer3) then
print("You got it right")
print("You've advanced to Round 4")
else
print(correctAnswer3 .. " Was the correct answer")
end
wait(2)
print("What year was the Good Friday agreement signed?")
input = io.read()
local number = (tonumber(input))
if (number == correctAnswer4) then
print("You got it right")
print("You've advanced to Round 5!")
print("This is the last round!")
else
print(correctAnswer4 .. " Was the correct answer")
end
wait(2)
print("How many nations participate in the world cup?")
input = io.read()
local number = (tonumber(input))
if (number == correctAnswer5) then
print("You got it right")
print("Congratulations you've won the game!")
else
print(correctAnswer5 .. " Was the correct answer")
end