
-----------------------------------
bigman9
Tue Jan 18, 2011 7:00 pm

proper format!
-----------------------------------
Hey so im a noob when it comes to formattting,

i finished my trivia game. can someone put like the proper indents and all that in?
THANKS:)




var name:string
var number:real:= 0
var key: string (1)
var score:real:=0
var restart: string (1)
loop
%Home screen
Draw.FillBox(0,0,maxx,maxy,41)
put "WELCOME TO THE ERGONOMICS TRIVIA QUIZ"
put "Click any key to begin the game"
getch (key)
cls

%Enter name screen
Draw.FillBox(0,0,maxx,maxy,40)
put "Please enter your name"
get name
put "Hello ",name
delay (1000)
put "Please select the correct answer for the following questions. Answer by hitting the correct number."
put "click any key to continue"
getch (key)
cls
%Question number 1
Draw.FillBox(0,0,maxx,maxy,9)
put "Q1 - How far away should a computer monitor be from your face?"
put "1) 45cm-65cm"
put "2) 100cm"
put "3) 20cm-40cm"
put "4) 200cm-210cm"
get number
if number = 1 then
put "Good job, that is the correct answer!"
put "Hit any key to continue to the next question"
score:= score+1
end if
if number>1 then 
put "sorry, that is not correct"
put "A computer screen should be 45cm - 65cm away from the face (answer 1)"
put "Hit any key to continue to the next question"
end if
getch (key)
cls

%Question number 2
Draw.FillBox(0,0,maxx,maxy,40)
put "Q2 - The temperature of an ergonomically should be between _________________ Celsius."
put "1) 40 - 50 degrees" 
put "2) 0 - 25 degrees"
put "3) 15 - 22 degrees"
put "4) 22 - 35 degrees"
get number
if number = 3 then
put "Nice one! You know your stuff"
put "Hit any key to continue to the next question"
score:= score+1
end if
if number>3 then
put "sorry, that is the wrong answer"
put "The temperature in a workplace should be kept between 15 - 22 degrees Celsius"
put "Hit any key to continue to the next question"
end if
if number2 then
put "sorry, that is not correct"
put "CTS is short for Carpal Tunnel Syndrome"
put "Hit any key to continue to the next question"
end if
if number1 then 
put "sorry, that is not correct"
put "A chair should have five legs for extera stability"
put "Hit any key to continue to the next question"
end if
getch (key)
cls

%Queastion number 8
Draw.FillBox(0,0,maxx,maxy,40)
put "Q8 - A desk should have ________________ to be safe and proper"
put "1) Sufficient leg room"
put "2) Smooth edges and rounder corners"
put "3) Medium and light coloured finishes"
put "4) All the above"
get number
if number = 4 then
put "Correct!"
put "Hit any key to continue to the next question"
score:=score + 1
end if
if number< 4 then
put "Nope, that is incorrect"
put "The right answer is number 4. All the above answers are important for having a safe desk area"
put "Hit any key to continue to the next question"
end if
getch (key)
cls

%Question number 9
Draw.FillBox(0,0,maxx,maxy,9)
put "Q9 - True or False? Plently of air circulation is important in a workplace"
put "1) True"
put "2) False"
get number
if number = 1 then
put "Good job, you're almost finished"
put "Hit any key to continue to the next question"
score:=score + 1
end if
if number = 2 then
put "Close, but no cigar!"
put "The correct answer is true. Plently of air circulation is important in a workplace"
put "Hit any key to continue to the next question"
end if
getch (key)
cls

%Question number 10
Draw.FillBox(0,0,maxx,maxy,40)
put "Q10 - What is the best definition of Ergonomics?"
put "1) The study of how the physical health of workers is affected by their workplace"
put "2) The study of how people affect their work enviroment"
put "3) How people hurt themselves while working"
put "4) How much money a worker makes every year"
get number
if number = 1 then
put "You finished the quiz on a good note!"
put "Hit any key to see your final score"
score:= score+1
end if
if number>1 then 
put "Sorry, i guess there is no happy ending for you"
put "The correct choice was number 1. The definition of Ergonomics is the study of how the physical health of workers is affected by their workplace"
put "Hit any key to zee your final score"
end if
getch (key)
cls

%Total score
Draw.FillBox(0,0,maxx,maxy,9)
put "You have completed the Ergonomics Trivia Quiz"
put "Your final score is ",score
if score = 1 then
put "You scored 10%. Better luck next time!"
end if
if score = 2 then
put "You scored 20. Better luck next time!%"
end if
if score = 3 then
put "You scored 30%. Better luck next time!"
end if
if score = 4 then
put "You scored 40%. Better luck next time!"
end if
if score = 5 then
put "You scored 50%. Just passed!"
end if
if score = 6 then
put "You scored 60%. Could use some improvement"
end if
if score = 7 then
put "You scored 70%. Decent job!"
end if
if score = 8 then
put "You scored 80%. Nice work!"
end if
if score = 9 then
put "You scored 90%. You're a pro!"
end if
if score = 10 then
put "You scored 100%. Unbelievable!!"
end if

%Return to main
put ""
put "Hit any key to return to the main menu"
getch (restart)
if restart = "y" then
end if
cls
end loop

-----------------------------------
TokenHerbz
Tue Jan 18, 2011 7:15 pm

RE:proper format!
-----------------------------------
just hit the indent button on your turing...

-----------------------------------
Dragon20942
Tue Jan 18, 2011 7:29 pm

RE:proper format!
-----------------------------------
F2 :/ thats what my teacher told me.

-----------------------------------
bigman9
Tue Jan 18, 2011 7:40 pm

RE:proper format!
-----------------------------------
thanks:)

-----------------------------------
Dragon20942
Tue Jan 18, 2011 8:17 pm

RE:proper format!
-----------------------------------
Actually, its the same thing as the indent, but I thought you meant tab, sorry.
